(covers information from several alternate timelines)
A pardon was a formal forgiveness of a crime and associated penalty.
In 2257, the President of the United Federation of Planets pardoned the convicted mutineer Michael Burnham and restored her rank of commander due to her actions while ending the war with the Klingons. (DIS: "Will You Take My Hand?")
In 2373, Captain Benjamin Sisko offered to arrange a pardon for Michael Eddington in return for assistance in stopping cloaked Maquis missiles that were reportedly on their way to Cardassia. Eddington ignored Sisko's offer, stating that his release would not bring back all of the Maquis that had died while he was in prison. (DS9: "Blaze of Glory")
In 2374, Gowron pardoned Grathon Tolar, an expert in holographic forgery who was being held in a Klingon prison, in order to assist Captain Sisko in bringing the Romulan Star Empire into the Dominion War on the side of the Federation. (DS9: "In the Pale Moonlight")