LivingSocial co-founder Tim O’Shaughnessy announced Friday that he is stepping down from the online deals company, bringing to a close a seven-year run that saw the company go from start-up to Internet e-commerce darling, only to pull back as it struggled for profits.

O’Shaughnessy, 32, explained his plans in a Friday morning e-mail to staff. He will remain chief executive until the company finds a replacement in the first half of 2014.

“It is my decision,” O’Shaughnessy said in an interview, adding that he has thought about moving on for a while. “You don’t wake up one day and decide.”

O’Shaughnessy first broached the idea of stepping down during a board meeting last month to discuss LivingSocial’s sale of Korean ticket company TicketMonster for $260 million, giving it a fresh infusion of capital.

“He was feeling that he had exhausted his well of capabilities to take this from a large company to a very large company, and had the personal sense to know when to ask to pass it on to new leadership,” said Tige Savage, a LivingSocial board member and investor with Revolution, a venture capital firm led in part by former AOL chairman Steve Case.

Tim O'Shaughnessy, CEO of Living Social. (Brett Carlsen/N/A)

O’Shaughnessy will continue to own a sizeable stake in LivingSocial. But his departure marks another turn in a story that has captivated the greater Washington technology community, giving hope that LivingSocial might have become the next AOL, a technology giant not tied to the fortunes of the federal government.

LivingSocial traces its roots to a start-up called Hungry Machine, founded by O’Shaughnessy and three young tech jockeys who had worked on a health-related start-up backed by Case. The tiny business attracted notice in its early days (it created a successful bookshelf app for Facebook), and caught fire as an early pioneer, with Groupon, in the business of marketing daily deals through e-mail.

That business quickly exploded, spreading to new cities and countries, and O’Shaughnessy became the toast of Washington, his company the subject of a competition among jurisdictions for the right to land LivingSocial’s headquarters. LivingSocial even caught the attention of, which purchased a 31 percent stake in the company. ( founder Jeffrey P. Bezos recently purchased The Washington Post.) An initial public offering seemed inevitable.

LivingSocial’s and Groupon’s success soon drew legions of copycats, and the market became saturated with vendors and not enough distinctive offers. Business slowed and LivingSocial tried in vain to find alternative sources of revenue. For instance, it ballyhooed then canceled a big summer concert on Randall’s Island in New York City.

It was wounded again last year after a cyberattack that compromised customer accounts, and as quickly as the company once added jobs, it began shedding workers and assets.

The restructuring has put LivingSocial on better financial footing, even though profits have long eluded it. The company had $106 million in losses for the first nine months of 2013.

”We had a lot of cleaning up of broken glass that we had to do,” O’Shaughnessy said. “We had to do some hard things and right things for the business.”

Going forward, “we need to do a better job of preventing unforced errors,” he said. “It is a more simplified business, and very, very well capitalized, and already has the ingredients to get back to growth.”

At LivingSocial’s Washington offices Friday, employees called O’Shaughnessy an approachable leader who encourages a relaxed yet high-energy office culture; he eschews a separate office in favor of working at a desk near entry-level employees in the office’s open floor plan. A life-size, smiling decal of the CEO is pasted on the wall next to the elevators in the office.

When Michelle Morris, his chief of staff, joined the company, O’Shaughnessy kept a refrigerator nearby stocked with ice cream, so employees would feel comfortable stopping by to talk.

O’Shaughnessy often shared anecdotes about himself and his three other co-founders as they bootstrapped Hungry Machine — such as when they used to sleep in two-hour shifts to keep the computer servers running.

Even as the company grew, O’Shaughnessy maintained the start-up atmosphere, said Kim Meehan, vice president of customer experience. “We may work an 18-hour day, but you may eat 30 cupcakes later. It’s the balance of ‘we’re different’ and ‘we’re working together,’ and hard.”

With O’Shaughnessy’s departure comes the gradual loss of institutional knowledge, said Adam Heintz, senior director of new and vertical business. After O’Shaughnessy leaves, only one of the four original founders, chief information officer Val Aleksenko, remains.

“You don’t just fill that gap,” Heintz said.

The company is using executive search firm Russell Reynolds to find a new CEO.

“After that is completed, I will exit stage right,” O’Shaughnessy said.

Capital Business is The Post’s weekly publication focusing on the region’s business community.