At the moment the commitment is to reduce emissions by 80% by that date, a move hailed as world-leading when it was first introduced.
The new target is “at the limit of feasibility”, according to the advisory body, the UK Committee on Climate Change.
But environmental campaigners were pressing for a 100% reduction in emissions - known as a “net zero” target - to be in the new Climate Change Bill.
Scottish Environment Secretary Roseanna Cunningham insisted Scotland’s legislation would be “tougher” than the 100% targets set by a handful of other nations.
She also stressed ministers were committed to achieving “net zero” as soon as possible, with the new law requiring ministers to keep this under review and take expert advice every five years.
Scotland’s original Climate Change Act of 2009 set targets to cut harmful emissions by 42% by 2020 and 80% by 2050.
As well as requiring a 90% reduction by 2050, the new Bill will introduce more challenging interim targets, such as a 56% drop by 2020, a 66% reduction by 2030 rising to 78% by 2040.
Announcing the new legislation Ms Cunningham said: “Our Climate Change Bill sets out our commitment to reduce emissions by 100% with ambitious interim targets which strengthen Scotland’s world-leading position on climate change.”
She added: “Our 90% target will be tougher even than the 100% goal set by a handful of other countries, because our legislation will set more demanding, legally-binding, annual targets covering every sector of our economy.
“By 2030, we will cut emissions by two-thirds and, unlike other nations, we will not use carbon offsetting, where other countries are paid to cut emissions for us, to achieve our goal.”
Ms Cunningham stressed: “The fight against climate change is a moral responsibility but Scotland’s academic and engineering expertise, coupled with our outstanding natural resources, mean it is also an economic opportunity.
“Climate change is one of the defining challenges of our age and Scotland’s international leadership means our plans must be ambitious, credible and affordable - which is exactly what the new Climate Change Bill delivers