His speech was not a call for a new spirit of bipartisanship, as Mr. Obama had pledged in 2004, but rather a spirited assault on the Republican philosophies offered up by Mr. Romney and Representative Paul D. Ryan, his running mate. Mr. Castro offered a direct rebuttal to the argument presented at last week’s Republican convention in Florida.

“Of all the fictions we heard last week in Tampa, the one I find most troubling is this: If we all just go our own way, our nation will be stronger for it,” Mr. Castro said. “If we sever the threads that connect us, the only people who will go far are those who are already ahead.”

Introduced by his twin brother, Joaquín, a Texas state representative who is a candidate for Congress, Mr. Castro stood before the convention as a new face of the Democratic Party. Elected mayor only two years ago, he is a rising figure in a party that has a far smaller bench than its rival.

He suggested that Mr. Romney and other Republicans were out of touch, noting a speech Mr. Romney gave in Ohio this year in which he urged students to start a business by borrowing money from their parents.