Boris Johnson secretly wants to take back powers from the UKs devolved parliaments, Scotlands deputy first minister is to tell the SNP conference.
John Swinney will urge delegates to "stand up and be counted before its too late" to defend devolution.
His comments were dismissed as "simply nonsense" by the UK government.
The conference, which is being held online, started on Friday and will end with SNP leader Nicola Sturgeons speech on Monday.
In his virtual speech on Saturday afternoon, Mr Swinney will tell members that the UK government wants "unfettered Westminster control on Scotland" and is using Brexit to undermine devolution.
He will argue that "the only way to keep the gains of devolution is by becoming independent" and will suggest that decisions made at Holyrood "can be routinely undermined at a whim by the Tories".
Mr Swinney will say: "We are now seeing a concerted attack on our parliament, from the very people who fought tooth and nail against it being established in the first place.
"In a grotesque irony, the Tories are using something that the people of Scotland voted overwhelmingly against - Brexit - to undermine something they voted overwhelmingly for - the Scottish Parliament.
"Through the Internal Market Act, the Tories have given themselves unfettered power to decide the rules of the internal market - and to completely ignore the devolution settlement if they want to."
Claiming that the prime minister could wish to reverse devolution, Mr Swinney will add: "There will be no sudden Big Bang moment, Boris Johnson is not going to stand up and announce to the cheering Tory faithful that he is dismantling the devolution settlement - much as I am sure he would like to.
"But make no mistake - piece by piece, devolution is quietly being filleted, hollowed out from the inside by a Tory Party which has always opposed the idea of anything other than unfettered Westminster control on Scotland.
"Much like the climate emergency, which is slowly creeping up on us every single day - we need to issue a code red for devolution.
"All of us who care so deeply about the Scottish Parliament and its role in Scottish public life need to stand up and be counted before it is too late."
The conference will also feature debates on issues including childrens rights, street harassment against women and an independent Scottish civil service on Saturday.
Responding to Ms Swinneys remarks, a UK government spokeswoman said: "This is simply nonsense.
"The Internal Market Bill ensures that vital trade can continue seamlessly between all four corners of the UK.
"Now more than ever, people in Scotland want to see the UK and Scottish governments working together to protect lives and livelihoods.
"The pandemic, and our collective response - from the furlough scheme to vaccine procurement and the backing of our military personnel - has shown that we are at our strongest when we work together."