PepsiCo quickly announced its support for the policy, which has been developed and adopted by the American Beverage Association (ABA).
The voluntary regulation means producers will only sell water and 100 per cent juice in elementary schools.
There will be no full-calorie soft drinks in middle schools until after school, including juices with five per cent or less juice, and bottled water, juice and sports drinks will make up half of the offering in high schools.
ABA said it was encouraging all firms involved in beverage sales to sign up to its new code.
Association president Susan Neely said the policy was a "common-sense" solution to child obesity worries in the US, and showed that the soft drinks industry was listening to the concerns of parents.
Soft drinks makers have come under intense pressure from health campaigners in the face of America's worsening obesity crisis.
And the industry will hope the new move can stave off the threat of legal action.
California Governor Arnold Schwarzenegger is pushing ahead with legislation that would extend a ban on soft drinks in elementary schools to high schools, while soft drinks firms are reported to have spent more than $250,000 lobbying against proposals to ban fizzy drinks and junk food from schools in Connecticut.
But, the voluntary regulation also reflects the desire of many soft drinks players to give their non-carbonated drinks portfolios more importance, in recognition of consumer health trends away from sugra-laden, fizzy sodas.
Both Coca-Cola and PepsiCo have recorded slower growth for their trademark fizzy colas during the last year.
And both have openly stated their intentions to build up a better low-calorie and non-carbonated range as water, juices and reduced or no-sugar drinks have begun to lead the sector forward.
Coca-Cola has launched a raft of products, such as the sugar free energy drink, Throttle, and Coca Cola Zero, since the start of 2005. PepsiCo has followed suit with similar launches, including revamping its one-calorie drink - Pepsi One - using Tate & Lyle's sucralose sweetener Splenda.
In any case, the voluntary school ban is a principled position that the industry can afford to take. It already has a general practice of not selling carbonated soft drinks to students in elementary schools.
School sales don't represent significant revenue for beverage companies either. For Coke, schools make up less than 1 percent of sales in North America.