The two men and their wives are scheduled to have dinner in the White House Blue Room at 6:30 p.m. ET.
Rubio told reporters at the Capitol that the President invited them for what Rubio expects to be "mostly a social" dinner.
"Obviously, we got to know each other a little bit over the last year and a half on the campaign trail. I don't know when it was scheduled -- a while back," he said. "We're grateful to them."
Rubio declined to share what he plans to discuss with the President.
"We're looking forward to it," he said. "I'm sure the food is really good."
Wednesday night's visit won't be Rubio's first trip to the White House since Trump became president. The senator accompanied his friend, former South Carolina Gov. Nikki Haley, to her swearing-in last month as US ambassador to the United Nations.
It's no secret that Trump and Rubio squared off in some of the most high-profile clashes of the Republican primary, roughly one year ago.
Rubio labeled Trump a "con artist" and mocked the size of Trump's hands in what became a surprising locker-room attack from the normally composed Rubio. The senator later apologized to Trump for the "hands" comments and publicly expressed regret.
For Trump's part, the billionaire used the moniker "Little Marco" when talking about the senator, even to his face at a debate in Houston, and at one point poked fun at the heel size of Rubio's boots.
The mending of fences appeared to be underway late last year, when Rubio was running for re-election to his Senate seat. While still stressing he disagreed with Trump on a number of issues, he endorsed the Republican nominee last summer.
And while Trump never appeared on the trail with Rubio, Vice President Mike Pence campaigned with the senator in Florida.
Still, even as late as a month before the election, Rubio said he wished Americans "had better choices for President."
Tensions arose again this year when Rubio, who sits on the Senate Foreign Relations Committee, expressed concern with Trump's pick of Rex Tillerson for secretary of state.
Given the Republican-Democrat balance on the committee, Rubio's support was crucial and his initial reluctance made the White House nervous.
He ultimately supported Tillerson in a committee vote and for final confirmation in a full Senate vote.
Rubio has also frequently taken issue with Trump's warm stance toward Russia, frequently calling Russian President Vladimir Putin a "thug."
Earlier this month, Rubio argued for the US to provide weapons to Ukraine
to help protect itself from Russian aggression.
"Vladimir Putin's continued aggression against the people of Ukraine is outrageous, and further destabilization in the region will have profound negative consequences for us here in America," he told CNN.
He noted that Tillerson and Defense Secretary James Mattis both advocated during their confirmation hearings for providing Ukraine with weapons to defend its sovereign territory.
"I hope President Trump will heed their advice," Rubio said. "We must stand with the people of Ukraine during this difficult hour and make clear to Putin that relations will not improve until Russia respects Ukraine's sovereignty."