In conversations with colleagues, fellow entrepreneurs and even musicians over the past decade, Daniel Ek would often abruptly shift the subject to something that really bugged him: health care. “I was like adamant to fix it,” Mr. Ek, the Spotify chief, told DealBook. He saw the industry as a bloated and inefficient colossus in need of disrupting.

The problem: Mr. Ek had neither a plan, nor the time or money to do much about it. He was busy taking on Apple, YouTube and Amazon Music in the streaming wars. In his spare time, Mr. Ek pored over medical journals. And he routinely measured his vital statistics with a Fitbit, an Apple Watch or Wii Fit tracker — the more data, the better to see how his body held up against the rigors of running a business. He thought that such tracking might hold some clue to living longer and healthier. “I was just toying around with ideas in health care,” he added.

That all changed in 2018. Spotify went public, making Mr. Ek a billionaire. It was time to turn his side focus into his next venture, he decided. He knew whom to contact: Hjalmar Nilsonne, a Swedish tech entrepreneur who Mr. Ek had met the year prior at the Brilliant Minds event, an annual gathering Mr. Ek started. Mr. Nilsonne was passionate about upending the status quo, too. At the time, he was focused on climate change and his start-up, Watty, which aimed to strip waste out of the energy grid.

At first, Mr. Nilsonne rebuffed Mr. Ek’s proposition. But Mr. Ek eventually won him over. (It helped that Watty was running out of money, and it was eventually sold to a German company.) Mr. Ek, a former computer coder, and Mr. Nilsonne, an engineer, zeroed in on building a better diagnostic tool. Their aim: disease prevention, and prolonging life. The company they founded, Neko Health, opened its doors in Stockholm last year, and it is set to open in London, its second market, this summer.

Longevity has become a kind of obsession with tech moguls. Sam Altman, Peter Thiel and Mr. Ek are among those who believe bright ideas, the right tech and bundles of capital can help humans live longer. Mr. Ek, 41, has invested millions personally and through his investment firm, Prima Materia, in such start-ups around Europe. Neko Health is the only one for which he’s taken the title of founder.