"This is the first time since 2000 for a cabinet-level official to visit Taiwan from the United States. It is of great significance for bilateral ties," Ma said while meeting McCarthy, administrator of the Environmental Protection Agency.
The United States switched diplomatic recognition from Taiwan to China in 1979.
It remains the leading arms supplier to the island, but has been cautious in holding official contacts with it.
China considers Taiwan to be part of its territory awaiting reunification -- by force if necessary -- following their split in 1949 at the end of a civil war.
Also Read
But relations have been on an upswing since Ma of the China-friendly Kuomintang party came to power that year.
Ma has referred to the former government as "troublemakers" and has repeatedly assured Washington of "no surprises" in his diplomacy, which is focused on securing a diplomatic truce with Beijing.
"I've striven to restore mutual trust since 2008, and this visit manifests our years-long efforts," Ma said, according to a statement by the presidential office.
But both Taipei and Washington have kept Mc Carthy's visit low-profile.
McCarthy visited an elementary school outside Taipei featuring a low-carbon classroom and a garden with an ecological area, and gave a speech at National Taiwan University on environmental cooperation between Taiwan and the United States.