The president also asked Americans to support U.S. troops by flying the flag, writing a letter to troops in the field and supporting a military family down the street.
Mr. Bush was applauded often as he spoke at a campus setting at the West Virginia University in front of American flags and red, white and blue bunting hanging from windows.
He said the insurgents won't win in Iraq.
"They continue to kill in hope they will break the resolve of the American people but they will fail," Mr. Bush said.
Mr. Bush said Iraqis are fighting alongside Americans, telling the cheering crowd, "As Iraqis stand up, we will stand down, and then our troops can come home to a proud and grateful nation."
On a hot, steamy day, the president removed his tie and rolled up his sleeves as he vowed, "We will stay until the fight is won." He added, "In this war there's only one option and that is victory."
Mr. Bush characterized the insurgents in Iraq as "men who celebrate murder" as they seek to spread their ideology and "turn the Middle East into a haven of terror."
Even though the television images of death "are "difficult for our compassionate nation to watch," Mr. Bush said, the insurgents are no closer to stopping the move toward democracy.
"Terrorists can kill the innocent but they cannot stop the advance of freedom," he said.
The president called Iraq only the latest battlefield in the war on terror, and warned that "America will not tolerate regimes that harbor or support terrorists."
Mr. Bush has made an Independence Day visit to West Virginia a tradition of sorts. This was his third time. And it was a quick one -- 90 minutes from touchdown to takeoff from Morgantown, according to his schedule.
Morgantown, in north-central West Virginia, is the state's fastest growing community. It climbed by about 1,350 people to 28,160 between April 2000 and July 2004, according to new census figures.
Several thousand students, veterans, civic leaders and members of the military listened to the president at West Virginia University's downtown campus for the ticket-only event. Demonstrators were kept some distance away and could barely be heard.
Public works and parks crews worked over the weekend to spruce up the areas where Mr. Bush's motorcade was to pass.
Last year, Mr. Bush spoke before about 6,500 residents at the state Capitol Complex in Charleston on Independence Day. In 2002, a crowd of more than 8,000 gathered to hear him speak in Ripley.
Mr. Bush crisscrossed the state during his re-election campaign last year, making nine visits between April and September. He won West Virginia's five electoral votes by more than 13 percentage points.
Mr. Bush also campaigned at Morgantown High School during the 2000 race. His visit to West Virginia University is the first by a sitting president since 1911, when William Howard Taft attended the inauguration of Thomas E. Hodges as the school's eighth president.