Sponsors of the Dream Act fell five votes short of the 60 they needed to break through largely GOP opposition and win its enactment before Republicans take over the House and narrow Democrats' majority in the Senate next month.
President Barack Obama called the vote "incredibly disappointing."
"A minority of senators prevented the Senate from doing what most Americans understand is best for the country," Obama said. "There was simply no reason not to pass this important legislation."
Dozens of immigrants wearing graduation mortarboards watched from the Senate's visitors gallery, disappointment on their faces, as the 55-41 vote was announced.
"This is a dark day in America," said Jorje-Mario Cabrera, a spokesman for the Coalition for Humane Immigrant Rights in Los Angeles. "The Senate has ... thrown under the bus the lives and hard work of thousands and thousands of students who love this country like their own home, and, in fact, they have no other home."
Hispanic activists and immigrant advocates had looked to the bill as a down payment on what they had hoped would be broader action by Obama and the Democratic-controlled Congress to give the nation's 10 million to 12 million illegal immigrants a chance at legal status.
It targeted the most sympathetic of the millions of illegal immigrants -- those brought to the United States as children, who in many cases consider themselves American, speak English and have no ties to or family living in their native countries.
"They stand in the classrooms and pledge allegiance to our flag," said Sen. Dick Durbin, D-Ill., the bill's chief sponsor. "This is the only country they have ever known. All they're asking for is a chance to serve this nation."
Critics called the bill a backdoor grant of amnesty that would encourage more foreigners to sneak into the United States in hopes of being legalized eventually.
"Treating the symptoms of the problem might make us feel better ... but it can allow the underlying problem to metastasize," said Sen. Jon Kyl, R-Ariz. "Unfortunately, that's what's happening at our border."
The legislation would have provided a route to legal status for an estimated 1 million to 2 million illegal immigrants who were brought to the U.S. before age 16, have been here for five years, graduated from high school or gained an equivalency degree and who joined the military or attend college.
Democrats' determination to vote on the bill before year's end reflected the party's efforts to satisfy Hispanic groups whose backing has been critical in recent elections and will be again in 2012. They said they'll try again in the next Congress, despite the increased GOP presence.
"The echo of this vote will be loud and long," said Rep. Luis V. Gutierrez, D-Ill., a key House sponsor of the bill. "We are at the tipping point that will define the political alignment of the Republican and Democratic parties with Latino voters for a generation."
"This country has a history of opening its arms," said Sen. Barbara Boxer, D-Calif. "Today, it's arms were closed, but we're going to get there."
Three Republicans -- Robert Bennett of Utah, Lisa Murkowski of Alaska and Richard Lugar of Indiana -- joined 50 Democrats and the Senate's two independents in voting for the bill.
Five Democrats -- Max Baucus of Montana, Jon Tester of Wyoming, Kay Hagan of North Carolina, Ben Nelson of Nebraska and Mark Pryor of Arkansas -- joined 36 Republicans in blocking it. Not voting were Republican Sens. Jim Bunning of Kentucky, Orrin Hatch of Utah and Judd Gregg of New Hampshire, and Democratic Sen. Joe Manchin of West Virginia.