The 24-year-old striker struggled to hold down a regular starting place following his arrival from Middlesbrough two years ago as part of the James Husband deal.
Main had one year still to run on his contract but his Doncaster career was effectively over last season when he opted to stay on loan at Oldham Athletic, who eventually survived the drop, despite Rovers’ desperate plight.
The transfer-listed frontman follows in the footsteps of Kyle Bennett and Enda Stevens, who joined Pompey from Rovers last summer.
He scored 11 goals in 58 appearances for Doncaster.
Major Doncaster bridge will be closed for a whole month for essential maintenance
Hosepipe ban for Doncaster as Yorkshire Water introduces drought restrictions
Doncaster man's lost watch appeal after going home with 'lass whose name he can't remember'
Man seriously ill in hospital as Doncaster city centre street cordoned off after assault
Caravan and garage deliberately set on fire in Doncaster
Main has penned a two-year deal at Fratton Park, with the option of a third year.