He said he would also be stepping back from his role on the public audit committee until the police investigation had concluded.
The 71-year-old was taken into custody and released without charge on Tuesday.
It came hours before First Minister Humza Yousaf set out his government's priorities for the next three years.
In a statement, Mr Beattie said he had resigned as treasurer with "immediate effect".
He said: "On a personal level, this decision has not been easy, but it is the right decision to avoid further distraction to the important work being led by Humza Yousaf to improve the SNP's governance and transparency.
"I will continue to cooperate fully with Police Scotland's enquiries and it would be inappropriate for me to comment any further on a live case."
Mr Yousaf said the resignation was "the right thing to do" and that a new treasurer would be appointed as soon as possible.
Police Scotland launched its Operation Branchform investigation into the SNP's finances in July 2021 after receiving complaints about how donations were used.
Former SNP chief executive Peter Murrell, who is married to former SNP leader and first minister Nicola Sturgeon, was arrested two weeks ago at the couple's home in Glasgow before also being released without charge pending further inquiries.
Officers spent two days searching the house, and also searched the SNP's headquarters in Edinburgh.
There have been newspaper reports that some people within the party are concerned that Ms Sturgeon could be the next person to be arrested in the inquiry.
Deputy First Minister Shona Robison, a close friend of Ms Sturgeon, said earlier on Wednesday that it would not be helpful to comment on the speculation and that she did not know if Ms Sturgeon had spoken to detectives.
Asked if she had been in contact with Ms Sturgeon, Ms Robison told the BBC's Good Morning Scotland programme: "Right at the beginning of the process I sent her a very short message asking after her welfare really and I got a very short reply.
"We have had no discussion whatsoever about the police investigation. It would not be appropriate for me to do so."
Mr Yousaf has dismissed calls for Ms Sturgeon, Mr Murrell and Mr Beattie to be suspended from the party while the police investigation is ongoing, saying he believes in people being innocent until proven guilty.
The party raised £666,953 through referendum-related appeals between 2017 and 2020 with a pledge to spend these funds on the independence campaign.
Questions were raised after its accounts showed it had just under £97,000 in the bank at the end of 2019, and total net assets of about £272,000.
Officers involved in the investigation spent two days searching the couple's Glasgow home and the party's headquarters in Edinburgh earlier this month.
A luxury motorhome was seized by officers from outside a property in Dunfermline on the same morning Mr Murrell was arrested.
The Mail on Sunday reported that the vehicle had been parked outside the home of Mr Murrell's 92-year-old mother since January 2021. It has since been moved to a police compound in Glasgow.
Leaked video footage published by the Sunday Mail at the weekend showed Ms Sturgeon playing down fears about the party's finances in a virtual meeting of the party's ruling body in March 2021.
The SNP's former Westminster leader, Ian Blackford, has insisted that there was "nothing untoward" in the clip and claimed that the party's finances are in "robust health".
But the Sunday Times has reported that Mr Beattie told the NEC at the weekend that the SNP was struggling to balance its books due to a drop in member numbers and donors.
Scottish Labour's deputy leader Jackie Baillie said Mr Beattie's resignation was the "right decision made by the wrong man".
She said there had been a "culture of secrecy" within the SNP and criticised Humza Yousaf's decision not to suspend those subject to police inquiries.
Scottish Lib Dem leader Alex Cole-Hamilton said Mr Yousaf is being "consumed by the chaos wracking his party".
Scottish Conservative chairman Craig Hoy added the priorities of Scotland were being ignored as a result of SNP "chaos".