Nathaniel Mendez-Laing gave Dale a first-half lead after exchanging passes with Ian Henderson.
Joe Edwards equalised for the hosts after the break following good work by Alex Gilbey and Chris Porter.
But Calvin Andrew netted Dale's winner, finding the top corner of James Bransgrove's goal with a curling shot.
Rochdale assistant manager Chris Beech told BBC Radio Manchester:
Media playback is not supported on this device
"Winning away is something we enjoy and to gain three points on the last day of the season is very fulfilling. It was so warm but the players stuck at it.
"Calvin Andrew got half a yard in the box and a rare moment, he scored with his right foot.
"We didn't get to where we wanted to go but not for the lacking of trying. To get 69 points is a commendable season's effort."
Relegated Colchester United bowed out of League One with a 24th league defeat of the season as a goal in each half gave mid-table Rochdale victory.