The scandal over the conduct of UK politicians claimed its first Holyrood scalp when Mr McDonald released a statement admitting his behaviour may have made others uncomfortable.
Mr McDonald,37, said he would remain as Aberdeen Donside MSP which he has served since the 2011 Scottish election.
Formerly regarded as one of the SNP’s rising stars, Mr McDonald issued an unreserved apology to those he may have upset.
His statement said: “It has been brought to my attention that some of my previous actions have been considered to be inappropriate – where I have believed myself to have been merely humorous or attempting to be friendly, my behaviour might have made others uncomfortable or led them to question my intentions.
“My behaviour is entirely my responsibility and I apologise unreservedly to anyone I have upset or who might have found my behaviour inappropriate.
“In light of my position in government, I believe it would not be appropriate for me to continue to serve in my role in the Scottish Government at this time and I have tendered my resignation as a minister.
“I hope that in taking this step neither any particular woman or my family will be the focus of undue and unwarranted scrutiny.
“It has been an honour to serve in the Scottish Government and I will continue to serve my constituents in Aberdeen Donside to the best of my ability.”