The text grants amnesty from prosecution for all crimes against the state dating back to September 17, 2000, the day the home of then military ruler Robert Guei, sparking the opening rounds of the civil war.
The law, signed by Gbagbo on Thursday, also says that compensation will be paid to all victims of the crimes it covers.
"The modalities of compensation, reparations and rehabilitation will be fixed by law," it said.
The amnesty is another indication that a "home-grown" peace deal Gbagbo signed last month with northern rebels may succeed where internationally brokered accords have failed.
Since signing the deal on March 4, Gbagbo has made rebel leader Guillaume Soro prime minister in a government of national unity charged with organising elections within 10 months.
United Nations to withdraw
|A UN force separates rebel-held areas in the north from government troops in the south|
The growing stability in the Ivory Coast has allowed United Nations peacekeeping forces in the country to begin planning their withdrawal.
Around 7,000 international troops are stationed along the buffer zone that formerly separated rebel forces in control of the northern half of the country from government-held areas in the south.
From Monday, the 7,000 UN troops and several thousand soldiers from former colonial power France will begin withdrawing in stages from the buffer zone.
They will gradually hand over control to a joint force assembled from rebel and government soldiers.