After the sentencing: What's ahead for Robert Moffat to right: Robert Moffat, James McDermott By James Bandler and Doris Burke

FORTUNE -- He was a high-flying executive whose career ended in disgrace after he was arrested and charged with giving insider information to his mistress. She, in turn, passed the secrets on to another boyfriend in a tawdry love triangle involving sex, phone calls and stock tips.

We're not talking about Robert Moffat, the former IBM (IBM, Fortune 500) senior vice president who was sentenced Tuesday to six months in federal prison after pleading guilty to charges of fraud and conspiracy related to the Galleon insider trading case. We're describing the spectacular plunge of investment banker James McDermott Jr. a little more than a decade ago. McDermott's case holds many eerie parallels with Moffat's and its denouement -- so far, anyway -- hints at a bleak future for the former star IBM employee who was once a contender for the CEO throne. McDermott's case shows that while a prison sentence fulfills a convict's formal debt to society, it may not mark the end of his punishment.

In McDermott's heyday, he was a star. The CEO of boutique investment bank Keefe, Bruyette & Woods during the 1990's, he seemed to have it all: A fixture on business cable television, he was telegenic and earned $4 million a year.

And then he fell in with the wrong woman. Sometime around 1996, McDermott began an extramarital affair. His lover, Kathryn Gannon, was a former adult-movie star who used the stage name "Marylin Star." Repeatedly, McDermott gave stock information to Gannon, prosecutors alleged. She traded on the information and passed the tips on to another boyfriend, who also traded on it.

Moffat's trust in a woman was also betrayed. His mistress, Danielle Chiesi, was a tenacious hedge fund analyst at the New Castle hedge fund who worked Moffat for information about upcoming deals. She stands accused of passing his tips on to her boss and sometimes lover, Mark Kurland. (See also: Dangerous liaisons at IBM: Inside the biggest hedge fund insider-trading ring)

Neither Chiesi nor Kurland traded personally on the information, but New Castle did. Chiesi pleaded not guilty and her lawyers have said she intends to fight the government charges. The Feds amassed information against Chiesi by tapping her phones. In the McDermott case, they weren't able to eavesdrop and had to rely on circumstantial evidence. To nail him, investigators matched trades with phone records between the two lovers. They tallied up some 800 calls between Gannon and McDermott -- 29 of them in one day.

Arrested in 1999, McDermott was convicted of insider trading and conspiracy. He was sentenced to 8 months in prison, but was released after five months after winning an appeal. The appeals court found that the government hadn't proved its conspiracy case and had tainted the proceeding by suggesting that McDermott had had an illicit relationship with Gannon.

But the government moved forward for a new trial, and in 2001 McDermott pleaded guilty to a single count of insider-trading. Two years later, he told the Wall Street Journal that he handled the stress of the prosecution by leaning hard on anti-depressants, counseling and his family. "Those are the things that kind of get you through the excruciating times of uncertainty and lack of control," McDermott said then. (In 2002, Gannon, too, pleaded guilty to two criminal counts and served three months in jail.)

Life after jail

Life hasn't gotten any easier for the former star investment banker. A woodworking venture he started cratered. State and federal tax liens multiplied and, according to the New York state court database, his house was foreclosed upon this spring. He also got into an ugly legal battle with his siblings over a family trust.

"He's a wonderful human being who didn't deserve what happened to him and he is being forced beyond his sentencing to pay for what he didn't do for the rest of his life," said a woman who answered the phone at McDermott's home in Westchester Monday night. She declined to be identified other than to say she'd spent her whole life with him. "He has never given up on himself and I've never given up on him." She said McDermott was out of the country and was not available to comment.

This person said McDermott doesn't speak much about his prison experiences. She called prison the "great equalizer" and said Moffat would lose any pride in prison. Her advice for him: "Pray, read and get in touch with your spiritual person, your inner self." As for Moffat's wife, Amor, this person advised her not to visit him in jail. "It's very demoralizing," she said. "There's nothing you can do or say."

Moffat has asked to be assigned to the federal correctional institution in Otisville, NY, which is a reasonable drive from his home in western Connecticut. The decision is up to the Federal Bureau of Prisons. (Bernard Madoff unsuccessfully sought to be sent to the same facility, which has a reputation for being one of the least onerous places to do time in the federal system.) The judge has ordered Moffat to report to prison on June 30, 2011, but he may ask to begin his sentence earlier.

How Moffat will fare in prison isn't clear. Though he rose to nearly the pinnacle of IBM, he never forgot his blue-collar roots and he won't likely flinch from menial tasks. An early riser and a stickler for punctuality, he should adjust easily to the prison regimen of frequent head counts and 6am wake-up calls.

Moffat's future

In many ways, he's fortunate. Even though he'd hoped to avoid jail time, Moffat's six-month sentence is, by federal standards, light. (98% of all federal inmates spend more than a year in jail.) By contrast, Chiesi, Moffat's former mistress, could spend decades in prison if convicted. Her boss, Kurland, pleaded guilty to two securities counts and received a 27-month sentence.

And what about life after prison? It need not be grim. Several high-profile individuals who've been associated with huge insider trading cases have bounced back after doing time (see Michael Milken and Martha Stewart). With his criminal record, employment at a big public company is probably out of the question, but he could easily be hired as a consultant. With his background in finance and supply chain management, Moffat has a lot of knowledge that companies could call on. Or, perhaps there's a future for him as a motivational speaker. A friend has invited him to speak about his experiences at an upcoming legal conference. The subject of the conference: business ethics. Moffat's talk, of course, will be cautionary.

Even if Moffat makes a successful transition from prison, he will always be associated with the scandal, and not for his considerable achievements at IBM. "What makes this so painful to me is the knowledge that my actions hurt my wife, my children, my brothers and sister, friends, colleagues and IBM, all of whom put their trust and confidence in me," Moffat told the judge at his sentencing hearing. "I let them down. I did not live up to the standards, values and ethics that are the foundation of who I am."

And the press will never let him forget it. After the hearing on Tuesday, a New York Post reporter pursued Moffat to the courthouse elevator and tried to board with him. The barrel-chested former track star barred the reporter's way. "Stay away from my family!" the Post quoted Moffat as shouting.

It was a last-ditch and desperate effort by Moffat to protect his loved ones, to shield them from the tabloid Furies his own reckless conduct had unleashed. To top of page