The Kirkaldy MP lost his position as the party’s vaccine spokesperson after he backed a crowdfunding campaign for a defamation case against his fellow SNP MP, Kirsty Blackman.
Mr Hanvey, a former NHS nursing specialist, was only appointed to the role on Wednesday, February 3.
The 56-year-old, who was also serving as the SNP’s member on the Health and Social Care Select Committee, was sacked when he refused to apologise to Ms Blackman.
An SNP spokesperson said: “Neale Hanvey was given the opportunity to apologise for his actions, which are incompatible with the responsibilities of a frontbench spokesperson, including the requirement for teamwork and collective responsibility.
“He failed to do so and he has been removed from his position.”
Mr Hanvey was previously suspended from the SNP during the 2019 General Election for using anti-Semitic language on social media.