It wasn’t so much that Kai-Fu Lee had trouble balancing work and life. It’s that work was his life.

As an Apple employee in the early 1990s, he almost walked out of the delivery room when the impending birth of his first child threatened to disrupt a presentation he was scheduled to give. As president of Google China from 2005 to 2009, he had a special table installed on his bed so that he could sit directly up from sleep and immediately begin responding to emails, without having to waste time standing up or reaching for a laptop.

He left Google to found a venture capital firm, Sinovation Ventures, and saw how companies that followed the “996” schedule popular with Chinese startups—9 am to 9 pm, six days a week—got “crushed,” as he called it, by those working their people seven days a week. He didn’t question what he was missing at home, or what all those hours were doing to his health.

“I was a maniacal workaholic,” Lee told an audience this week at the End Well Symposium, an annual conference in San Francisco about death, design, and rethinking approaches to mortality. “That workaholism ended abruptly about five years ago, when I was diagnosed with Stage IV lymphoma.”

Lee flashed a slide of his MRI scans, which showed tumors “like fireballs” across his abdomen. He was given months to live. It was enough time, he said, to become filled with regret for all he had missed in his years striving toward the top.

His father had died, and he never got a chance to say goodbye or tell him that he loved him. His mother had dementia and no longer recognized him. His children had grown up.

As he went through treatment for his lymphoma, he said, he met with a Buddhist monk who asked Lee why he had lived as he did. “To make a difference,” Lee insisted, to which the monk responded: You did no such thing.

You worked to make yourself famous, the monk said. If you really want to make a difference, you need to produce more love, starting with those around you.

Lee’s lymphoma is in remission. He certainly hasn’t stopped working—he is still the CEO and chairman of Sinovation—but he has made some key changes to his life. He and his wife moved closer to Lee’s mother. His wife accompanies him on all his travels now. And “I take my vacations when my kids have time, not when I have time,” he said with a smile.

His experience also changed his view of artificial intelligence, a focus of his work since his doctoral thesis on speech recognition at Carnegie Mellon University in the 1980s. The two human qualities that can’t be automated, he said, are creativity and love. As a hard-charging executive, he had recognized the value of the former, but it was not until his illness that he fully appreciated the value of the latter.

The best role for AI in the future, he said, is to free humans and resources for well-paying jobs in caregiving and creative fields— jobs that deserve far more compensation and status than they currently have. “The future is not gloom and bleak,” he insisted. Instead of taking away our jobs and purpose, he said, AI can help humans focus on what they do best.