The Wisconsin Republican cast the decision as a personal one, saying he did not want his children growing up with a "weekend dad." He told reporters he believes he's leaving with strong accomplishments his party can sell to voters ahead of November elections.
"I have given this job everything I have," he said. "We're going to have a great record to run on."
Ryan's plans have been the source of much speculation and will set off a scramble among his lieutenants to take the helm. A self-styled budget guru, Ryan had made tax cuts a centerpiece of his legislative agenda, and a personal cause, and Congress delivered on that late last year.
Ryan, 48, first announced his plans at a closed-door meeting of House Republicans Wednesday morning. His tone was somber, and he read directly from prepared remarks. Rep. Mark Walker, R-N.C., said an emotional Ryan "choked up a few time trying to get through" his remarks to colleagues and received three standing ovations.
Moments later, Ryan told reporters that if he were to stay for one more term, his children — now all teens — would only know him as a weekend dad.
"I can't let that happen," he said.
The speaker called extended family and a few close friends Tuesday night and alerted a few staff. On Wednesday morning, he called the president and the vice president and informed the rest of his staff before going to the conference meeting, officials said.
Ryan, who has had a difficult relationship with President Donald Trump, thanked the president for giving him the chance to move the GOP ahead.
Ryan, a Republican from Janesville, Wisconsin, was first elected to Congress in 1998. Along with Reps. Eric Cantor and Kevin McCarthy, he branded himself a rising "Young Gun" in an aging party.
He became the GOP presidential nominee Mitt Romney's running mate in 2012.
Ryan was pulled into the leadership job by the abrupt retirement of House Speaker John Boehner in 2015. Boehner had struggled to wrangle the chamber's restless conservative wing and failed to the seal big-picture deals on fiscal policy he sought. Ryan had more trust with the hardliners in the House, but had no more success in brokering fundamental reform of entitlement he sought.
He ultimately had to wrestle with another unexpected challenge: President Donald Trump, a president with little of Ryan's interest in policy detail or ideological purity. The two have had not had a close working relationship.
House Majority Leader McCarthy, a Republican from California known to be tighter with Trump, is expected to seeking the speaker post. He will likely compete with House Majority Whip Steve Scalise, of Louisiana, for the job. Both men spoke at the closed-door meeting Wednesday, delivering tributes to Ryan.
In Wisconsin, the most likely Republican candidate is state Assembly Speaker Robin Vos, multiple Republicans in the state said. Vos did not immediately return telephone or text messages.
Another Republican mentioned as a potential candidate is longtime Ryan family friend and Ryan backer Bryan Steil, an attorney and member of the University of Wisconsin Board of Regents. Steil did not immediately return an email seeking comment.
Democrat Randy Bryce, a colorful ironworker who has cultivated an "IronStache" moniker, had been Ryan's best-known challenger, drawing liberal support from around the country. He had nearly $2.3 million in the bank at the end of the first quarter. Janesville teacher Cathy Myers was also running on the Democratic side. The only declared Republican was Paul Nehlen, who was banned from Twitter for a series of posts criticized as racist or anti-Semitic.
AP reporters Alan Fram, Kevin Freking and Andy Taylor contributed from Washington. Scott Bauer contributed from Madison, Wisconsin, and Steve Karnowski contributed from Minneapolis