Defense and non-defense discretionary spending has shrunk across the board as a result of reductions under a process known as sequestration. To maintain critical functions, many government agencies are making workers take unpaid leave.
As many as 700,000 civilians will have to take one unpaid day off each week for up to 14 weeks in the coming months.
The US has been facing economic consequences from the $85 billion in cuts - called a sequester - that started to hit federal programmes last month after Congress failed to stop them.
The president's self-imposed pay cut, since last month (when the spending cuts began), would last until the end of December.
Obama earns $400,000 (over Rs 2 crore) a year and the 5 per cent cut would total $20,000 (over Rs 10 lakh), the amount similar to the level of cuts to non-defense government agencies.
The president's gesture followed the one taken by Defense Secretary Chuck Hagel. The Defense Secretary will give back the equivalent of 14 days worth of pay to the government, about $10,750.
"The President has decided that to share in the sacrifice being made by public servants across the federal government that are affected by the sequester, he will contribute a portion of his salary back to the Treasury," White House spokesman Jay Carney told reporters traveling with the president in Colorado and California.
However, Obama is not the first president to give up part of his pay. Herbert Hoover put his salary in a separate account, then divided it to pay for charity and to employees he felt were underpaid. John F Kennedy donated his presidential salary to various charities.
Even the first president of the US, George Washington refused pay during the latter part of his military career. He tried to decline presidential salary but the Congress insisted on a payment of $25,000.