Resignation is the act of giving up or quitting an office or position.
During the Klingon Civil War Worf resigned his Starfleet officer's commission in order to fight with Chancellor Gowron against the Romulan-backed Duras sisters. Following Gowron's victory Worf returned to duty in Starfleet at his previous rank of Lieutenant. (TNG episode: "Redemption")
After the Tezwa incident, Federation President Min Zife was forced to resign by a group of Starfleet officers, including Jean-Luc Picard, William Ross, Alynna Nechayev, Owen Paris, Edward Jellico, and Mamoru Nakamura. Unfortunately for Zife, he was assassinated almost immediately after resigning by Section 31. (TNG novels: A Time to Heal, A Time for War, A Time for Peace; ST novel: Articles of the Federation)