Mormons consider themselves Christians, as noted in the church’s formal name, the Church of Jesus Christ of Latter-day Saints, but evangelicals do not consider the Mormon scripture to be Christian.

Mr. Romney also alluded to abortion and the recent controversy of whether religious institutions should offer birth control in their health coverage, which is seen by evangelicals as an issue of religious freedom.

And in a nod to the Republican rival favored by many Christian conservatives, Mr. Romney mentioned Rick Santorum, saying that Mr. Santorum stressed that “culture matters,” that marriage, family and work determine success in life.

“What you believe, what you value, how you live, matters,” Mr. Romney said.

Mr. Romney’s speech was also notable for its overt religiosity, a tone that he had resisted, even during the Republican primaries, when conservative Christians were questioning his faith.

“What we have, what we wish we had — ambitions fulfilled, ambitions disappointed, investments won, investments lost, elections won, elections lost — these things may occupy our attention, but they do not define us,” he said. “Our relationship with our maker, however, depends on none of that. It is entirely in our control, for he is always at the door, and knocks for us. Our worldly successes cannot be guaranteed, but our ability to achieve spiritual success is entirely up to us, thanks to the grace of God. The best advice I know is to give those worldly things your best but never your all — reserve the ultimate hope for the only one who can grant it.”

Republican politicians seeking evangelical votes often come to Liberty University. John McCain gave a speech there in 2006, in what came to be seen as penance for calling Mr. Falwell and Pat Robertson “agents of intolerance.” His speech that year stuck to a defense of the Iraq war.

Eric Fehrnstrom, a top Romney adviser, said in a conference call on Friday that his address would not be political in tone, but more of a graduation speech. While Mr. Romney offered the traditional advice to graduates, his speech was clearly meant to reach out to a bigger audience, the evangelical voters who have doubted Mr. Romney’s faith and understanding of their cause since 2008, when he first ran for president.