Their decisions cleared the way for top rival Mitt Romney, who promptly claimed victory in the early test of organizational strength.
Both Giuliani, the former New York mayor, and McCain, an Arizona senator, insisted they would still compete in the state's leadoff caucuses in the GOP presidential nomination process.
"We are 100 percent committed to winning the Iowa caucuses in January," said Mike DuHaime, Giuliani's campaign manager, even as he announced the decision to skip the Aug. 11 straw poll.
Hours later, Terry Nelson, McCain's campaign manager, told The Associated Press that McCain won't participate in light of Giuliani's announcement because "it's clear that the Ames straw poll will not be a meaningful test of the leading candidates' organizational abilities."
That left Romney, the former Massachusetts governor, as the only top-tier GOP candidate to commit to the nonbinding contest. He has put extraordinary resources into preparing for the event that now shapes up as a contest involving several lesser-known contenders.
"I just got a win of sorts, with the two national front-runners realizing they couldn't keep up with me in the first state in the presidential sweepstakes," Romney said, putting a positive spin on the developments while in New Hampshire. "They read the handwriting on the wall and are packing up their tents and going elsewhere."
Opinion polls and Romney's own internal surveys show him having made gains in Iowa from March through May, while Giuliani and McCain lost some ground.
Held at Iowa State University in Ames, the straw poll is a dress rehearsal that allows GOP candidates to measure their organizational strength months before the caucuses, a one-day contest that requires a strong get-out-the-vote operation.
Republican-only straw polls have been held in every competitive presidential cycle since 1979, and no candidate has skipped the event and won Iowa the following January.
Iowa GOP Chairman Ray Hoffman said both Giuliani and McCain will be hurt by not participating.
"They are missing a huge opportunity," Hoffman said, calling the event a cheap way to promote their candidacies. "I don't get it. I don't understand why they are doing this. I still believe we are going to have a record turnout and I believe the advantage is going to those who participate. This could create a big opening."
A state GOP fundraiser, the straw poll can cost campaigns millions. Because anyone with a ticket can vote, campaigns traditionally purchase blocks to distribute to their supporters and set up air-conditioned tents filled with food and entertainment.
The decisions by Giuliani and McCain reflect the pressures of 2008's rapid-succession primary calendar that is forcing campaigns to rethink their strategies and use money when and where it counts.
Indeed, Giuliani's campaign attributed the decision to finances, saying the estimated $3 million he would spend would be better used to lay the groundwork for winning the caucuses.
But the move also amounts to recognition by Giuliani that McCain and Romney may be better prepared to turn out backers in Iowa in just two months' time. Giuliani is in a tight race in Iowa and trails both in building state operations.
Observers have questioned whether Giuliani would bypass Iowa altogether to focus on competing later in delegate-rich states such as New York, Florida, New Jersey and California, where his moderate positions on social issues have more appeal.
DuHaime countered that suggestion, saying: "There's no de-emphasis at all on the first states."
McCain didn't compete in the caucuses in his failed 2000 run, but he has since put together a solid Iowa team and is vigorously campaigning in the state.
He lags behind Romney and Giuliani in fundraising and cash-on-hand, and the senator's decision to bypass the straw poll will allow him to save money — and avoid a potentially embarrassing finish. Some Republicans in Iowa still view him skeptically for his rebellious streak as well as his positions on immigration and ethanol.
Nelson indicated the senator will cede no ground.
Bob Haus, a veteran GOP activist in Iowa who is uncommitted in the race, said anyone who skips the event will have a difficult time convincing supporters that they can bypass the August test but still compete in the caucuses. "You can't sit out half the game and expect to be the effective closer," he said.