The owner of the Valiant Tobacco Company, aspiring to be the next Alfred Nobel, offers $25 million dollars to any town that can go without smoking for 30 days. Merwin Wren (Bob Newhart), their PR director who originally came up with the idea, is certain the offer will give the company much needed publicity, but no town will ever claim the prize. Upon hearing of the offer, Rev. Clayton Brooks (Dick Van Dyke) convinces his congregation that this is just what their dying town of Eagle Rock, Iowa needs. With permission from the mayor and town council, Brooks heads up a campaign to get everyone in Eagle Rock to pledge to quit smoking for 30 days and claim the prize. Eventually, Brooks convinces the entire town to pledge and the 30 day challenge is on. The Board of Directors for Valiant is concerned that the town will succeed, but Wren assures them that the town will not succeed, and will go there to keep them updated on their status.
Eagle Rock's pledge is receiving national attention, and people and companies come to town to try to cash in on their popularity. The townspeople are also being followed around by the national media. However, the townspeople are having withdrawal symptoms, and the challenge is threatened everyday. As the challenge continues, Valiant is growing more concerned that they will have to pay the prize, and order Wren to now try to get people to break the pledge. Wren does this by going around everywhere with his gun-shaped lighter, tempting the townspeople.
On the final day of the challenge, the entire town is gathered at the town center waiting for the clock to strike at midnight so they can claim the prize and start smoking again. Wren arranges for the town clock to strike 10 minutes early, and dumps several thousand cigarettes from a helicopter in a last ditch effort to get the town to fail in it's pledge. Brooks, the mayor, and the entire town council succeed in telling the townspeople to wait the 10 more minutes, but Brooks sees Wren trying to light the cigarette of the town doctor. In the crowd, Wren drops his lighter, and sees one of the townspeople holding it. He grabs it and tries to light the cigarette, but accidentally shoots the doctor. It turns out it was a real gun that is identical to his lighter. In the confusion, Wren and Brooks are also shot. The ten minutes have gone by, and one of the Valiant board members reluctantly hands over the $25 million dollar check to the mayor. At this time, the President arrives and announces that the town has been chosen to be the site of the military's newest missile factory. Meanwhile, the doctor, Rev. Brooks, and Wren are all being ignored as they lay dying on the street while the townspeople are cheering the President and smoking all of the cigarettes that were dropped from the sky.
The final scene of the movie shows the factory, with all four of it's smokestacks billowing lots of smoke into the atmosphere.