The 27-year-old left Rovers to join Saints in 2012 but has spent most of the last season-and-a-half on loan in the Championship, first with Nottingham Forest, then with Reading.
Sharp, a prolific goalscorer in the second tier, is now back in the division again after Doncaster moved to bring him back to the Keepmoat Stadium.
"I'm delighted to bring back Billy to Doncaster Rovers," boss Paul Dickov told the club's official website.
"I've been looking to bring in an experienced Championship striker who is capable of winning matches for the club and Billly is that type of player.
"The fact that Billy knows the club so well and has such a fantastic relationship with the fans will hopefully mean he can hit the ground running straight away."