Costa was roped in by the Blues for 32 million pounds ($32.4 million) in 2014 and was understood to be close to a return to former allegiance Atletico Madrid after a spluttering 2015-16 season.
The Brazil-born Spain international has since netted 14 English Premier League goals with Chelsea taking a six-point lead courtesy of 13 successive victories.
"Did I want to go? Yes, yes, I was about to leave. But not because of Chelsea," the 28-year-old was quoted as saying by BBC.
"There was one thing I wanted to change for family reasons but it wasn't to be, and I continue to be happy here. I knew I had to improve that aspect because here in the Premier League there is no mercy," Costa said.
"A lot of the time it seemed (referees) were against me. If they're not going to change, I had to change," he added.
Costa scored 20 goals in his first season, as Chelsea won the Premier League title under Jose Mourinho.
But after that, the lull started setting in with the brash forward finding the back of the net only four more times by the time Mourinho was sacked in December 2015.