On the morning of Friday, May 24, former SuccessFactors CEO Lars Dalgaard stood in front of several hundred employees in a dark suit and an ivory-colored tie. The normally dressed-down executive was known for his rambling, town-hall-style speeches; this one would be his last. Earlier that morning SAP — the German software giant that acquired SuccessFactors for $3.4 billion just 18 months earlier — had announced that Dalgaard was stepping down from his role as head of SuccessFactors and leader of the larger company’s cloud business. “I’m going to be an investor in a venture capital firm,” Dalgaard told the audience. Behind him a sign inscribed with some of his favorite quotes read, IF YOU DON’T LOVE WHAT YOU’RE DOING, GO WORK SOMEWHERE ELSE.
It was a likely ending to a common Silicon Valley tale — studies show that over two-thirds of CEOs who sell their company leave the acquiring firm within two years. While Dalgaard, 45, had been given a seat on SAP’s powerful executive board, many speculated that the brash, outspoken CEO wouldn’t last long in SAP’s more buttoned-up culture. But his departure had a much more personal catalyst — his father’s sudden death and his young son’s battle with acute lymphoblastic leukemia, a cancer that attacks the body’s blood-forming tissues. Dalgaard’s story is an extreme example of the difficult choices executives make when balancing work and family. “I thought I was awake before, but I woke up bigtime,” he says.
Love him or hate him — there are partisans in both camps — Dalgaard speaks his mind. The 6-foot-3 former Unilever exec, originally from Denmark, is known for his brutal honesty and wrenching displays of emotion — he has cried in front of employees on several occasions. After taking over human resources software firm SuccessFactors in 2001, Dalgaard retooled the failing startup into one of the largest cloud-computing companies, taking it public in 2007. On Dec. 3, 2011, SAP — a decades-old business software vendor that had spent years trying to break into the cloud — announced it was buying SuccessFactors for $3.4 billion. Dalgaard, who speaks about the cloud with born-again fervor, was given a seat on SAP’s executive board. He spent the first few months at the new company crisscrossing the globe, spreading the gospel of cloud-based software to employees and customers.
After a brief family vacation in Malibu, Calif., in May 2012, Dalgaard was once again packing his bags — this time for an SAP shareholder meeting in Mannheim, Germany. But he couldn’t stop looking at his son, Lars Jr., who hadn’t been his usual bouncy self for two days. Tiny red spots had appeared on Lars Jr.’s body, and he was listless. “He was like a piece of melted brie,” recalls Dalgaard.
His then-pregnant partner took Lars Jr. to a nearby emergency room. A short while later, as he was about to get into a limo and head to the airport, Dalgaard called her to check in. “I asked, ‘So what is it?’ ” he says. “I was still in business mode.” The doctors at UCLA Medical Center had discovered that Lars Jr. had an abnormally high white blood cell count, a sign of leukemia. Dalgaard threw down his suitcase and rushed to the hospital. Just six hours later, he was deciding which batch of heavy-duty chemotherapy drugs to pump into his son’s body — the doctors didn’t want to lose any time. The treatment would kill the quickly replicating bad blood cells, but it would destroy good ones too.
At SuccessFactors, Dalgaard was known for his colorful pep talks. He also had a reputation as a demanding boss who once kept employees working straight through Christmas Eve. Like many CEOs, he was a multitasking workaholic who slept little and spent most of his time on a private jet. But shortly after his son got sick, Dalgaard called SAP’s co-CEOs to tell them he was out. It didn’t work — they persuaded him to stay on, even if it meant they wouldn’t be seeing much of him in the coming months. “I told him, ‘Be with your son and your family,’ ” says Bill McDermott, co-CEO of SAP. ” ‘We’ll take you as you are, and you don’t have to get on any plane for SAP.’ ”
At over 90%, the survival rate for children with leukemia is quite high. But the lengthy treatment they must endure all but wipes out their immune systems and wreaks havoc on their bodies. During the first few months of treatment, Lars Jr. received a concoction of chemotherapy drugs with unpronounceable names like daunorubicin, pegaspargase, and methotrexate. Some had to be injected directly into his spine. “You’re literally destroying your child because you know it can save him,” says Dalgaard, who spent a total of 200 nights at the hospital with his son over the past year. When Lars Jr. woke up screaming and tried to pull out his many tubes in the middle of the night, Dalgaard calmed him down with songs and imaginary yarns. He changed diapers full of toxic excretions — a result of the chemotherapy drugs — and held little Lars’s hand while nurses, oncologists, hematologists, and anesthesiologists poked and prodded him. He bought hundreds of Lego sets and books, anything to keep his son occupied during long hospital days. When Lars Jr.’s hair began to fall out, Dalgaard shaved his own head in solidarity. “Your job becomes keeping him normal,” says Dalgaard. “What you don’t want to come out of it is that he becomes an unsociable person because he’s scared of the whole world.”
Despite the side effects, Lars Jr. responded well to treatment. Eventually Dalgaard bought a house in Malibu so that his family would have their own place to live between the many hospital stays — and where he could occasionally get away to work. He set up a videoconferencing room where he could sit in on SAP’s board meetings and talk to employees. “It ended up helping me to have that,” says Dalgaard. “Those are the two things I did: I worked, and I took care of him. I did nothing else.”
By early winter Dalgaard was feeling optimistic. His partner had given birth to a healthy baby girl, whom they named Khaleesi Annalisa. (She is named after a character in the Game of Thrones series.) While still in and out of the hospital for treatments, Lars Jr. was making progress. His hair was even starting to grow back in. Dalgaard thought the worst was behind them; a sense of normalcy started creeping back into their lives.
A few days before Christmas, Dalgaard took his family to a friend’s house in Los Angeles to watch an early screening of the movie Lincoln. “It was the first time we were actually mingling in society again,” Dalgaard recalls. Lars Jr. was playing with the other kids in the house but seemed lethargic and felt hot. He had a fever — potentially lethal for a small child with a reduced capacity to fight off infections. Dalgaard drove to the emergency room, and over the next few days Lars Jr. was fed a steady drip of antibiotics — in addition to the usual dose of chemo. His immune system worsened, and he became agitated, screaming and yelling at the sight of needles. On Christmas Eve, still stuck in the hospital, Dalgaard drew a makeshift tree on a large whiteboard in Lars Jr.’s room. (Plants weren’t allowed inside.) He decorated it with stars and stuck small toys and stickers on it. “You feel completely powerless,” says Dalgaard. “So you resort to things you can do something about.”
On a warm day in early May, just before his father unexpectedly died (and three weeks before he stepped down from his role at SAP), Dalgaard held yet another of his signature town-hall-style meetings at SuccessFactors’ South San Francisco office. It happened to be “take your kids to work day” at the office, and Lars Jr. — along with at least a dozen other children of employees — was in the room. His dark hair had grown back, and he was standing near the rear with his nanny. After the usual impromptu speech about how employees should love what they do, Dalgaard handed over the microphone to SuccessFactors’ chief people officer and swiftly made his way across the room to pick up his son, whose cancer is now officially in remission. (Lars Jr., now 3, will need to take “maintenance” chemotherapy drugs for the next three years.)
“It put things in perspective for him,” says Jesper Tullin, Dalgaard’s longtime friend and head of a Denmark-based real estate management portfolio. “You can say all the right words before you get into a situation like this, but now he knows what he gives highest priority.”
Dalgaard is the first to admit that he has the luxury to live the way he wants, and that not having to worry about money enabled him to focus on his son. But he is far from retiring. He says he will stay on as “cloud adviser” at SAP, working one day a week at the SuccessFactors office. And top Silicon Valley venture capital firm Andreessen Horowitz recently announced Dalgaard will join as its newest general partner. “We want people who have built a company in a way that people who were part of that process would do it again a thousand times,” says Ben Horowitz, the firm’s co-founder. “Lars is going to create other companies,” adds Marc Benioff, CEO of Salesforce.com. “Lars is a wild man.”
Indeed, Dalgaard says he believes his new role as an investor will enable him to create “hundreds” of SuccessFactors. He says that he is ready for his new life, and that his son taught him the power of taking the time to check in with his emotions. At the all-hands meeting on May 24 to announce his departure, Dalgaard encouraged employees to learn from his experience too. “I think it’s okay that your work-life balance is a little more normal [under SAP],” Lars told his former team. “I was pretty much killing you all every day. But it’s actually okay to have a family.”
This story is from the July 1, 2013 issue of Fortune.