The 33-year-old Wales international has left Liverpool to join up with his hometown club, with whom he spent the 2010-11 season on loan, ahead of the new Championship season
The 33-year-old Wales international, who spent the 2010-11 campaign on loan with the Bluebirds, completed a medical in South Wales on Thursday.
Bellamy was born in Cardiff and has dropped down to the second tier of English football to return to his hometown club, where he will wear the number 39 shirt.
He made 33 appearances in all competitions for the Reds last season, scoring nine goals, and will join up with his new team-mates ahead of their opening game of the season against Huddersfield Town.
"I would like to place on record my thanks to a number of key parties that have facilitated Craig's return," Cardiff chief executive Alan Whiteley told the club's official website.
"Firstly to the club's Malaysian investors, Tan Sri Vincent Tan and Dato' Chan Tien Ghee; their support, commitment and confidence in the vision and ambition of the club has enabled us to attract and retain a squad containing the calibre of players that we now have. This, quite clearly, is demonstrated by Craig's confidence in joining us at this time.
"I would also like to thank our manager for his tenacity and single mindedness in ensuring the transfer could take place - and for making my life a misery until such time as it could be completed!
"And of course to Brendan Rodgers and Liverpool Football Club; their assistance and support during the process of negotiations have been conducted in an extremely professional and amicable manner, of which we are grateful.
"Finally to Craig, for having the confidence and courage to buy into and wanting to be a part of the club's future.
"I am sure that Liverpool will agree that their loss is this football club's gain and that Craig's return will be met with huge excitement and enthusiasm by all Cardiff City fans - and as the perfect backdrop to the start of the new season."