"'In a Good Cause—'" (quotation marks in title), a novelette by Isaac Asimov, not part of a series; also the answer to this old question and this one and this one.
Plot summary from Wikipedia:
The story opens with a description of a statue on the grounds of the United Worlds organisation raised to Richard "Dick" Altmayer. It displays a quote and three dates, which correspond to the three days upon which he was arrested for his beliefs. The first is in the year 2755 of the "Atomic Era" (corresponding to 4700 CE in Asimovean chronology).
Altmayer and his friend Geoffrey Stock have opposing positions when conscripted into military service for a war between human-occupied star systems. Stock willingly reports for military duty, whilst Altmayer protests, believing that the various interstellar nations of humanity should be united against the Diaboli, an intelligent non-human race that also occupies several planetary systems in the galaxy.
Over a 45-year period, Stock reaches high military rank and then political office, whilst Altmayer is imprisoned and kept under house arrest several times for his radical idealism. He starts political parties and protest movements, all of which fail to achieve their objectives of uniting humanity.
Ultimately, Altmayer's desire for a united humanity is achieved after a war against the Diaboli. This unity, however, has been realised only through Stock's political manipulations rather than Altmayer's idealistic actions. Stock asks his one-time friend to be one of the delegates from Earth to a peace conference, but realizes that history will not record his own participation in the unification of humanity, but will instead vilify him as a cruel and short-sighted politician.
"It is all exactly as I say. You were a voice in the wilderness, Dick, crying for union. Your words will carry much weight. What did you once say: 'In a good cause, there are no failures.'"
"No!" said Altmayer, with sudden energy. "It seems your cause was the good one."
Stock's face was hard and devoid of emotion. "You were always a misunderstander of human nature, Dick. When the United Worlds is a reality and when generations of men and women look back to these days of war through their centuries of unbroken peace, they will have forgotten the purpose of my methods. To them they will represent war and death. Your calls for union, your idealism, will be remembered forever."
He turned away and Altmayer barely caught his last words: "And when they build their statues, they will build none for me."