Elim Garak was a Cardassian shopkeeper who lived on station Deep Space 9. He had been a operative in the Cardassian Obsidian Order, but had been exiled to Terok Nor. He worked with Starfleet during the Dominion War, and returned to Cardassia Prime after the Battle of Cardassia.
Life in the Obsidian Order
Garak had been a high-ranking member of the Cardassian intelligence agency, the Obsidian Order. He had been the protege of his father, Enabran Tain, head of the Order, though their familial relationship was kept secret. During his time as an operative, Garak had been instrumental in the arrest and execution of Gul Dukat's father (DS9: "The Wire"). He also spent time as a gardener on Romulus at the Cardassian embassy. During his time there he may have been involved in the deaths of several important Romulan officials, including Proconsul Merrok and Subcommander Ustard ("Broken Link"). Garak also spent time on Tzenketh, where he was trapped in a small room during an operation. After this event, Garak acquired a strong case of claustrophobia ("The Die is Cast").
As an Obsidian Order operative, Garak volunteered to have a cranial implant installed in his skull which would help him resist torture. The implant released endorphins when pain receptors where triggered, thus making the experience of torture tolerable ("The Wire").
In 2368 Garak somehow betrayed Tain, and Tain ordered him killed. Garak escaped, but was exiled from his homeworld of Cardassia Prime. He later claimed he was exiled for accidentally killing several Cardassian officers who were onboard a transport going from Bajor to Terok Nor when he destroyed it. Garak thought he was in fact killing members of the Bajoran Resistance who were planning to sabotage Terok Nor ("The Wire"). Parts of this account however are almost certainly fabricated or distorted, as Garak was fond of saying "the truth is just an excuse for lack of imagination" ("The Wire", "Improbable Cause").
After his exile, Garak took up residence aboard Terok Nor, under the command of Gul Dukat. Bitter over Garak's involvement in his father's death, Dukat attempted to have Garak executed ("Civil Defense"). Garak again escaped death's grip, surviving until the Cardassian government withdrew from the station in 2369. He set up a tailor's shop, and went into business ("Past Prologue").
Life on Deep Space Nine
Garak kept contacts in the Cardassian Union after his exile, and when Starfleet took control of station Deep Space 9, he attempted on occasion to use his position as the only Cardassian still aboard to regain his usefulness. Many on the station believed Garak was still a spy. He befriended Doctor Julian Bashir, and began to reveal small bits of information to the doctor about his past and current events. The doctor used this aid on several occasions to unravel Cardassian affairs onboard the station ("Past Prologue"). Bashir and Garak began to have weekly lunches, where they grew to be friends ("Cardassians").
In 2370, Garak was offered a chance to regain his position on Cardassia by killing members of the Cardassian Underground. When the deal was revealed as a lie, he instead helped them escape ("Profit and Loss").
Later that year, Garak began having life-threatening headaches. He had been using his cranial implant continuously for two years to aleviate the pain of being exiled to a Bajoran space station. The implant began to malfunction, and Doctor Bashir was forced to remove it. Garak had to begin to live without the device ("The Wire").
In 2371 an explosion destroyed Garak's shop. Garak was later revealed to have caused the explosion himself, to pre-empt an upcoming assassination attempt by the Flaxian Retaya by drawing Odo into investigation. The two later learned that the assassination was ordered by his former mentor, Enabran Tain. Tain offered Garak his old position back, and despite their past history, Garak accepted ("Improbable Cause"). Garak joined Tain on a joint Obsidian Order-Tal Shiar mission to destroy the Founders' homeworld in the Gamma Quadrant. The mission failed and the Dominion destroyed Tain's fleet at the Battle of the Omarion Nebula, though Garak escaped aboard the USS Defiant. He returned to Deep Space Nine and rebuilt his shop ("The Die Is Cast").
Garak contacted Gul Dukat in 2372 to warn him of the impending Klingon invasion of Cardassia. He and Dukat fought side-by-side to defend the Detapa Council members during the First Battle of Deep Space Nine ("The Way of the Warrior").
In hopes of finding any survivors of the Cardassian fleet, Garak returned to the Gamma Quadrant on the Defiant in 2372. During the trip he was informed by the Female Changeling that there were no survivors, and that in fact, one day all Cardassians would die by the Dominion's hand. While in orbit of the Founders' new homeworld, Garak attempted to obliterate the Great Link using the ship's quantum torpedoes. His attempt failed, and he was imprisoned on Deep Space 9 for six months ("Broken Link").
After his sentence was complete, Garak returned to his tailor shop. When Dukat's half-Bajoran daughter, Tora Ziyal, came to the station in 2373, Ziyal became attracted to Garak. The two formed a bond, and Ziyal fell in love with him ("For the Cause").
Garak recieved a message from the Gamma Quadrant later that year from Enabran Tain. Travelling to Dominion space, Garak and Lieutenant Commander Worf were captured and imprisoned on Internment Camp 371. There he found Tain, dying. ("In Purgatory's Shadow"). On his deathbed, Tain finally admitted that Garak was his son, and told Garak that he was proud of him. While Garak was at the camp, Gul Dukat, as the new leader of Cardassia, again ordered Garak's execution. Garak though had modified Tain's subspace transmitter to allow the prisoners to escape from the camp. He returned to his shop on the station, and Ziyal ("By Inferno's Light").
For some reason, the inhabitants of the station eventually began to trust Garak, something he found disconcerting. He joined a mission to station Empok Nor, to find parts to repair Deep Space 9. While there, he was exposed to a psychotropic drug. Garak became deranged and killed several Starfleet officers before being subdued by Chief Miles O'Brien ("Empok Nor").
The Dominion War
When Starfleet withdrew from the Bajoran sector at the start of the Dominion War, Garak joined the crew of the USS Defiant. He explained that he would rather stay with his Federation associates than live on the station, which would soon be under the command of Gul Dukat ("Call to Arms"). His knowledge of the Cardassians proved a valuable asset to Starfleet Intelligence, though he cooperated rather reluctantly ("Favor the Bold"). When Starfleet retook Deep Space Nine during Operation Return, Garak found that Tora Ziyal had been killed ("The Sacrifice of Angels").
Later in 2374, Captain Benjamin Sisko asked for Garak's help in finding evidence that the Dominion was planning an invasion of Romulus. Garak contacted his remaining contacts on Cardassia Prime and found them willing to assist, but then they were all killed within one day of speaking with him. Garak then proposed that they fabricate the evidence in order to give the Romulan Star Empire reason to join the war. However, he knew that the faked recordings would not fool the Romulans. His true purpose was to assassinate Senator Vreenak, and implicate the Dominion so that the Romulans would enter the war ("In the Pale Moonlight"). Garak spent the rest of the war decoding Cardassian transmissions for Starfleet Intelligence ("Afterimage").
During the final months of the war, Garak used his contacts in the Cardassian Union to find the leader of the Cardassian Liberation Front, Damar. Finally returning to his people with Colonel Kira Nerys and Constable Odo, Garak aided Damar's resistance against the Dominion ("When It Rains..."). When the fledgling resistance was crushed by the Jem'Hadar, Garak, Kira, and Damar retreated to Tain's house, his boyhood home, where he was reunited with Tain's housekeeper and confidante, Mila. From there they led a civilian uprising on Cardassia ("The Dogs of War").
After Mila was killed in the final days of the Dominion War, Garak joined the uprising and participated in the storming of Dominion Headquarters. With the war over, Garak's exile had ended. However, the Cardassia he knew was gone forever, destroyed by the Dominion ("What You Leave Behind").
In the Deep Space Nine book relaunch novel A Stitch in Time, it was revealed that Mila was in fact Garak's mother. This would explain why she was so dear to Garak and why Garak lived with her and Tain when Tain never acknowlegded him as his son. The novel also provided a large amount of background information on Garak by the man who knew him best, Andrew Robinson.