Microsoft CEO Satya Nadella had been asked to give his advice to women who are uncomfortable requesting a raise.
His response: "It's not really about asking for the raise, but knowing and having faith that the system will actually give you the right raises as you go along."
Not asking for a raise, he added, is "good karma" that would help a boss realise that the employee could be trusted and should have more responsibility.
But his comments caused an uproar online.
Microsoft posted a memo from him on its website. In it, Mr Nadella said he answered the question "completely wrong".
"Men and women should get equal pay for equal work. And when it comes to career advice on getting a raise when you think it's deserved ... you should just ask.
"Without a doubt I wholeheartedly support programs at Microsoft and in the industry that bring more women into technology and close the pay gap," Mr Nadella wrote.
He also tweeted a partial apology.
Still, his comments at the Grace Hopper Celebration of Women in Computing underscored why many see technology companies as workplaces that are difficult to navigate or even unfriendly for women and minorities.
Tech companies, particularly the engineering ranks, are overwhelmingly male, white and Asian.
Only 29 per cent of Microsoft's employees are women, figures show, and its technical and engineering staff and management are just 17 per cent female.
Others on Twitter were equally unimpressed by Mr Nadella's apology.