The plan was announced just after the Mexican president cancelled a visit to Washington, amid a row sparked by the question of who will pay for the wall.
Mr Trump on Wednesday signed an executive order to create a wall on the US southern border with Mexico.
Making Mexico pay for it was one of his key election campaign pledges.
But President Enrique Pena Nieto has always insisted that will not happen and on Thursday he pulled out of next week’s White House meeting.
Hours later, White House spokesman Sean Spicer told reporters that the president had discussed the funding proposal with lawmakers, and that they are considering making it part of a tax reform package the US Congress is planning.
He said that a 20% tax could generate approximately $10bn (£8bn) in tax revenue per year.
“Right now our country’s policy is to tax exports and let imports flow freely in, which is ridiculous”, Mr Spicer said aboard Air Force One, adding that the tax will “easily pay for the wall”.
The two countries exchange about $1.6bn (£1.27bn) per day in cross-border trade.
The plan is still being finalised, he explained, saying that the tax could ultimately be as low as 5%.
Reince Priebus, the White House chief of staff, later said that the border tax is only one of several options being considered.
The rift between the neighbours and trade partners has deepened just days into Mr Trump’s presidency.
After Mr Pena Nieto pulled out of the summit, Mr Trump said the meeting would have been “fruitless” if Mexico didn’t treat the US “with respect” and pay for the wall.
Earlier Mr Pena Nieto said he “lamented” the plans for the barrier.
US Senator Lindsey Graham tweeted his response to the tariff plan
Simply put, any policy proposal which drives up costs of Corona, tequila, or margaritas is a big-time bad idea. Mucho Sad. (2)
— Lindsey Graham (@LindseyGrahamSC) January 26, 2017
In a televised address, the Mexican leader told the nation: “I’ve said time and again: Mexico won’t pay for any wall.”
Republican Senator Lindsey Graham warned that US consumers may wind up bearing the cost of the proposed tax.
“Any tariff we can levy they can levy. Huge barrier to econ growth”, he wrote online.
“Build that wall” was one of Mr Trump’s campaign rally slogans, referring to the construction of a barrier along the 2,000-mile (3,200km) boundary.
As he signed the directive at the Department of Homeland Security, he spoke of a “crisis” on the southern US border.
His executive orders also called for hiring 10,000 immigration officials to help boost border patrol efforts.
“A nation without borders is not a nation,” Mr Trump said. “Beginning today the United States gets back control of its borders.”