Bellamy returns to Cardiff having spent a year on loan at the Bluebirds before joining Liverpool.
The 33-year-old has just returned from international duty with Team GB at the Olympics, where he helped his side to the quarter-final.
A statement on the club's official website read: "We can today announce Craig as a full registered Cardiff City player in readiness for the new season. We all look forward to his contribution to the team in the years to come."
Bellamy, who will wear the number 39 shirt at Cardiff, scored 11 goals in 39 games during his first spell with the club.