The new Code of Practice published by the British Bankers' Association (BBA) follows criticism from MPs that some banks had deceived current and savings' account holders by changing interest rates without their knowledge.
The Treasury launched an investigation earlier this year into claims by the Commons Public Accounts Committee that banks had been offering some customers rates as low as 1 per cent on accounts they deemed "obsolete".
The Treasury wanted an end to "shrinking" - the practice where high-interest accounts were launched only to have their rates down-graded or terms changed some months later.
Treasury Minister Helen Liddell ordered an inquiry into the MPs' claims, and threatened that such practices would be made illegal under the forthcoming Financial Services Bill, unless banks sorted out their affairs voluntarily.
Today's BBA Code of Practice promises to offer "fair and reasonable" rates to those whose accounts have been declared obsolete through low use.
It also makes clear that no bank can change the terms and conditions of an account without 30 days written notice and a further 30-day waiver of any penalty charges incurred when accounts are changed. To ensure that customers can compare rival deals fairly, all interest rates have to be calculated in a standard way.
David Davis, chairman of the Public Accounts Committee, said: "This is a victory for common sense and for customers. If the banks obey not just the letter but the spirit of the code then they will go a long way to winning back the confidence of customers."