The Federation doesn't use prisons except to hold captured criminals prior to treatment. As far as criminal behavior goes, it's treated as a psychiatric disease, and prisoners are "patients", sentenced to rehabilitation therapy. It's likely that Maxwell was sentenced to therapy for 6+ months or so (the same sentence Garak received for attempting genocide against the Founders).
OK, so there are penal colonies, where Tom Paris was serving time, but it makes one wonder whether penal colonies are simply where people stay while they're being treated.
So it's possible that Maxwell would've been released long before the Maquis movement started, but would he have joined after his therapy?
We have no indication that the kind of therapy we saw in Dagger of the Mind is still practiced in the 24th century. Especially given how often we see or hear about people being imprisoned. Tom Paris was doing time at a penal colony and agreed to join Voyager for an early parole. Dr. Bashir's father was sentenced two years at a penal colony for gentically enhancing Julian as a child. Commander Eddington seemed to spend all day in a starbase's brig. As did Quark's cousin Gaila.
It would seem in the 24th century, traditional prison time is the norm again in the Federation, and I doubt a starship captain who launched unprovoked attacks on an ally and killed innocent people serving on said ally's starships would only get a six month sentence.
As I recall, those episodes never used the name Section 31. And why should we think that an Earth organization from the 22nd century is the same as the "agency" that "Luther Sloane" claimed to work for in the 24th century?
Official Paramount production reports confirm that Agent Harris was indeed with Section 31. Aside from the part in the episode where he talks about section 31 of the Starfleet charter, you have Lt. Reed constantly talking about "your section," always with emphasis on section. And like Sci
mentioned, they wore the exact same outfits.