The 25-year-old midfielder will complete a permanent move once he reaches the end of his current deal at Millwall.
He will then become a free agent and return to the Reebok Stadium.
Trotter ended the 2013/14 campaign with Bolton, having made a loan switch at the end of January.
He made 16 appearances for Dougie Freedman's side, scoring one goal.
Bolton have now moved quickly to snap him up long-term, with Trotter becoming their second signing of the summer following the acquisition of Neil Danns from Leicester City.