Dore Gold has served as director general of Israel's foreign ministry since June 2015 and has been a close adviser to Netanyahu for more than two decades.
The ministry statement did not provide further details of why he was resigning.
"I would like to thank Prime Minister Netanyahu for his confidence in me," the statement quoted Gold as saying.
"As in the past, I will make myself available to the prime minister's needs in any capacity he sees fit."
More From This Section
"Dore has been at my side for 25 years and I am sure he will remain available for any (future) mission," he said in a statement.
Netanyahu's office later announced that the prime minister had chosen career diplomat Youval Rotem to replace Gold.
Rotem is a former ambassador to Australia and the ex-head of the cabinet of the foreign minister.
Gold's resignation comes at a crucial time for Israeli diplomacy.
Israeli leaders are concerned US President Barack Obama will seek to lay out parameters for a resolution to the Israeli-Palestinian conflict before he leaves office in January.