The 24-year-old former Middlesbrough player has the option to extend his contract by a further 12 months.
Main scored four goals in 18 league games while on loan at Oldham last season after falling out of favour at his parent club.
He is Portsmouth's eighth summer signing as they look to improve on their play-off finish last season.
Main's arrival at Fratton Park follows that of defender Tom Davies, who joined Pompey on Friday on a two-year deal, having been released by Accrington at the end of last season.
Find all the latest football transfers on our dedicated page.
Portsmouth have signed striker Curtis Main from Doncaster Rovers for an undisclosed fee on a two-year deal.