A plea bargain was a legal agreement whereby one agreed to accept a sentence in order to gain a concession from a judge or other person of authority.
Plea bargaining was a Ferengi legal tradition, according to Benjamin Sisko. In 2369, believing it was in the best interest of Deep Space 9 for Quark to continue to maintain his bar, but knowing the Ferengi did not want to stay aboard, Sisko used the fact that Nog was in custody to negotiate a deal – namely, that Quark would stay if Nog was released. (DS9: "Emissary")
In 2373, Richard Bashir turned himself in and agreed to serve time in prison for having illegal genetic engineering conducted on his son Julian, in exchange for Julian being allowed to remain in Starfleet. (DS9: "Doctor Bashir, I Presume")