Michael R. Bloomberg, who bypassed his own run for the presidency this election cycle, will endorse Hillary Clinton in a prime-time address at the Democratic National Convention and make the case for Mrs. Clinton as the best choice for moderate voters in 2016, an adviser to Mr. Bloomberg said.

The news is an unexpected move from Mr. Bloomberg, who has not been a member of the Democratic Party since 2000; was elected the mayor of New York City as a Republican; and later became an independent.

But it reflects Mr. Bloomberg’s increasing dismay about the rise of Donald J. Trump and a determination to see that the Republican nominee is defeated.

Mrs. Clinton is seeking to reach out to middle-of-the-road swing voters and even moderate Republicans uneasy about Mr. Trump. Polls show that significant numbers of Republicans remain wary of Mr. Trump, and question his fitness for the presidency.

Mr. Bloomberg will vouch for Mrs. Clinton “from the perspective of a business leader and an independent,” said Howard Wolfson, a senior adviser to Mr. Bloomberg.

“As the nation’s leading independent and a pragmatic business leader, Mike has supported candidates from both sides of the aisle,” Mr. Wolfson said. “This week in Philadelphia, he will make a strong case that the clear choice in this election is Hillary Clinton.”

Mr. Bloomberg, who has been sharply critical of Mr. Trump’s views on immigration and the economy, may fortify Mrs. Clinton’s appeal to the political center.

And with the Republican nominee basing his campaign on his background as a businessman, Mr. Bloomberg, a billionaire media executive and philanthropist, may help counter the Trump sales pitch.

It is unusual, but not unheard-of, for a speaker who is not a member of a political party to address that party’s convention. Mr. Bloomberg is expected to speak on Wednesday, the same evening as President Obama and Vice President Joseph R. Biden Jr.

Mr. Bloomberg and Mrs. Clinton are not personally close but had a positive working relationship when he served as mayor and she as a senator from New York.

Mr. Wolfson said the Clinton campaign had contacted Mr. Bloomberg several weeks ago to ask if he would be willing to address the convention. Mr. Bloomberg, he said, mulled over the idea and ultimately agreed to speak, after drafting a speech that reflected his distinctive set of political views rather than a boilerplate Democratic message.

Mr. Wolfson also said Mr. Bloomberg was pleased by the selection of Senator Tim Kaine, a former governor of Virginia and a strong supporter of gun control, as Mrs. Clinton’s running mate.

Mr. Bloomberg is not an entirely natural fit for the Democratic Party of 2016: Though he has been an energetic advocate on issues related to guns, immigration and climate change, he has also been a vocal ally of the financial services industry and has defended the strict policing tactics his administration employed in New York.

Jennifer Palmieri, Mrs. Clinton’s communications director, said Mr. Bloomberg would bring to the convention “a unique and important voice that lays out the choice in this election.”

“As a business leader and philanthropist, Michael Bloomberg has lived his values and fought to make a difference for others,” Ms. Palmieri said.

The Trump campaign did not immediately respond to a request for comment.

In the past, Mr. Bloomberg has rebuked Democrats for attacking Wall Street — a part of his record that may sit uneasily with liberal Democrats, and especially with the supporters of Senator Bernie Sanders of Vermont who are already smarting from his defeat.

Mr. Bloomberg has been quiet in recent months about the presidential race. But in the past, he has criticized Mr. Trump in stark terms, describing him as a threat to American security.

When he decided late last winter not to run for the White House, Mr. Bloomberg explained that he could not take the risk of running an independent campaign that might inadvertently ease Mr. Trump’s path to power.

Mr. Bloomberg castigated Mr. Trump at the time for his proposals to ban Muslim immigration and deport millions of undocumented immigrants, as well as his pledge to launch trade wars with China and Japan.

“These moves would divide us at home and compromise our moral leadership around the world,” Mr. Bloomberg wrote. “The end result would be to embolden our enemies, threaten the security of our allies, and put our own men and women in uniform at greater risk.”

In April, he warned in a commencement address at the University of Michigan that the country faced an unprecedented political threat from “demagogues” in both parties.

Mr. Bloomberg, who served for 12 years as the mayor of New York, has never addressed a political convention in a partisan capacity. He appeared at the 2004 Republican National Convention in New York in his role as mayor of the host city.

He endorsed Mr. Obama for re-election in 2012, writing in a column that his views on climate change had been the decisive factor.

Michael Nutter, a former Philadelphia mayor, said he expected Mr. Bloomberg to receive a “warm and positive welcome” from delegates, even though he is not a Democrat. Mr. Nutter said it made political sense to go after voters outside the party: Mr. Bloomberg, he said, could help persuade other business leaders to back Mrs. Clinton, “in some cases Republican business people.”

“I think Mike Bloomberg gives validation to Hillary Clinton and the campaign,” said Mr. Nutter, a Democrat. “We want to win, and everybody has a role to play.”