The 30-year-old, released by Nottingham Forest, becomes Rotherham’s seventh summer signing.
Millers manager Steve Evans told the club’s official website: “The chairman more than anyone will be aware that when I provided him with a list at the beginning of May of players we were targeting, Greg Halford quite simply was at the top of that list.
“There are a number of reasons behind that, not only is he a talented footballer, he is a talented footballer in a vast number of positions.
“He was nothing short of outstanding when he played as a main striker, when he led by example in helping Nottingham Forest to the play-offs when Billy Davies was in charge.
“Having spoken to Billy he gave Greg a huge endorsement, not only for his ability to play as a striker, but equally playing in central midfield, any full-back position and as many people will identify playing at centre-back.”
Halford joined Forest for an undisclosed fee in July 2012 and scored eight goals in 82 appearances for the club.
He slipped down the pecking order at the City Ground last season and joined Brighton on loan in November, making 19 appearances.
Halford, who started his career at Colchester, counts Reading, Sunderland, Wolves and Portsmouth as his former clubs and has also had loan spells at Charlton and Sheffield United.