Nathaniel Mendez-Laing says he wants to "leave the past behind" after serving a second suspension for cocaine use.
The Football Association (FA) has revealed the 28-year-old served a three-month ban after a positive drugs test administered on 4 July 2020.
Cardiff released Mendez-Laing in September 2020 for what the club termed an "alleged breach of contract".
The FA said the Middlesbrough winger admitted taking cocaine "in a context unrelated to sporting performance".
Mendez-Laing was charged and provisionally suspended for breaching anti-doping regulations on 14 August 2020 and could have faced a longer ban.
However, an independent regulatory committee decided a three-month ban was in line with the 2021 World Anti-Doping Agency (Wada) code, which permits reduced sanctions for "substances of abuse" designed to focus on drugs that Wada says are "frequently abused in society outside the context of sport".
UK Anti-Doping confirmed Mendez-Laing is free to resume playing. Its judgement also revealed Mendez-Laing had already served a ban for taking cocaine in 2019.
Mendez-Laing provided an out-of-competition urine sample to Ukad officials on 9 December 2019, which found the presence of cocaine.
The player was provisionally suspended on 7 February 2020, and was charged with a breach of the FA's social drugs policy on 21 April 2020. He received a three-month ban that was backdated and he became free to play again in May 2020.
Mendez-Laing's second positive test came on 4 July 2020, after a match against Bristol City. The player admitted to taking cocaine at 10pm the night before.
After serving his second ban, Mendez-Laing joined Middlesbrough, where he has reunited with his former Cardiff manager Neil Warnock.
He could be in line for his Boro debut in Saturday's Championship game at Derby County.
"With the help of my family, close friends, my agent, and the PFA (Professional Footballers' Association) during this extremely difficult time, I have been able to overcome my personal hurdles, to focus, and invest my time in working hard, determined to return to football," Mendez-Laing told the BBC in a statement.
"I appreciate all the support I have been given throughout. I now want to leave that period of my life in the past where it belongs.
"I'm excited about the future and delighted to be back doing what I love."
The former Wolves, Peterborough and Rochdale winger was part of the Cardiff side that won promotion to the Premier League in 2018.
Mendez-Laing made 92 appearances for the Bluebirds, scoring 14 goals.
"I think we all make mistakes. I do know the boy obviously, I signed him from Rochdale, I have had him three years through ups and downs and everything. Sometimes you get in a situation like Mendez has got in," Warnock told BBC Radio Tees last week.
"There were one or two other clubs after him and as I said to his man (agent) and himself, I think you are better off coming with me in the circumstances now because… he has got to get his career back on line really."