Raynes gained a host of experience playing for Stockport and Scunthorpe before joining the Millers this time last year, making a total of 36 appearances for the club last term.
And U's manager Chris Wilder is delighted to have fought off rival competition to capture the 24-year-old.
"He adds depth to the squad and has plenty of games under his belt for someone of his age," Wilder told the club's official website. "He has won promotion from this league and played a lot of football in the Championship and League One.
"He was coveted by three or four clubs in this league this summer and a club in Scotland, and we are delighted he sees his future here at Oxford United."