Microsoft CEO Satya Nadella has spent the past 25 years of his career working at the software giant.
But he says he learned a critical lesson about leadership not during his time as an executive in the tech industry, but from his experience playing high school sports in India. As a junior at Hyderabad Public School, Nadella played cricket, the popular bat-and-ball game often compared to baseball.
His team had a great reputation, and some of his teammates went on to play the sport professionally. Nadella himself was "obsessed" with the sport, the CEO said in a recent interview with The New York Times' Rebecca Blumenstein.
But he wasn't always good at it.
What happened during one particular match taught him a key lesson about success that he still carries with him today.
"I was a 'bowler,' or a pitcher," Nadella says, "and I was serving up real trash one day."
His pitches were giving the opposite team easy points, and his team was falling behind. So the captain called him off the field and stepped in to take his place. Nadella stood on the sidelines, thinking he wasn't going to get a chance to play again in the game.
But after a few rounds, the captain gave Nadella another shot to get back on the field and redeem himself.
"I've always asked myself, 'Why did he do that?'" Nadella says. "He could have just replaced me and moved on."
According to the CEO, the team captain knew that by taking a player out of the game and keeping him out, he would have discouraged him and chipped away at his will to succeed.
"I did much better during the second half of that game," he says, "and then I had a pretty decent season."
That particular match, and the second chance he was given to succeed, taught Nadella that when it comes to boosting someone's performance, encouragement is the best strategy.
"That to me was one of those very subtle but very key leadership lessons," the CEO says. "You can't take your key people out if they fail the first time, [or] pass harsh judgement without understanding the context."
Nadella isn't the only leader who says that sports helped shape his career. Billionaire Richard Branson says that playing tennis taught him the ability to move on from past failures and stay focused on the future.
In fact, a Cornell University study found that playing sports helps young people build their leadership skills and boosts their confidence. One 2013 Ernst & Young survey found that 96 percent of women in C-suite roles played sports.
In his new book "Hit Refresh," Nadella writes that the best leaders are those who are empathetic and build a positive culture.
Nadella writes that the ability to lead others with compassion, a lesson he learned "on the cricket field," is crucial.
Like this story? Like CNBC Make It on Facebook.