WASHINGTON—President Donald Trump has accepted House Speaker Paul Ryan’s invitation to speak in front of a joint session of Congress next month.

Mr. Ryan wrote on Twitter Tuesday that he had invited the new president to Capitol Hill on Feb. 28, in what is expected to be one of Mr. Trump’s first major public addresses as president. Later in the day, White House press secretary Sean Spicer said Mr. Trump had accepted.

The...