The final score was 5 - 2 in the Carabao Cup.
It was a good match for Rochdale at the Crown Oil Arena and they go on to face Carlisle in the next round.
Bolton took the lead 14 minutes into the game when Ronan Darcy's low drive from 25 yards beat Robert Sanchez in the Dale goal.
But Dale levelled in the 26th minute when Callum Camps was fouled by Yoan Zouma as he collected MJ Williams' lofted pass into the area, Ian Henderson comfortably stroking home the resulting spot kick.
Before the half was out, Dale hit the crossbar twice through a Matty Done shot and then Jim McNulty's header.
Bolton were ahead again two minutes into the second half when Dennis Politic robbed Tyler Magloire of the ball and slammed a shot past Sanchez, but once again the home side drew level, substitute Rekeil Pyke heading home in the 64th minute.
And two minutes later Dale took the lead for the first time, Camps firing a thunderous finish into the roof of the net from the edge of the area.
Camps added Dale's fourth on 73 minutes, blasting home from 10 yards, and Ollie Rathbone headed a fifth in the 86th minute.
Do you have a story for us? Want to tell us about something going on in Tameside, Oldham or Rochdale? Let us know by emailing firstname.lastname@example.org , calling us on 0161 621 6515 , tweeting us @rev962 or messaging us through our Facebook page. All contact will be treated in confidence.