The island has been trying for years to rejoin but China has so far managed to block its application.
Taiwan's more aggressive approach this year has heightened tensions with China and Beijing has vowed to use force against Taiwan if it ever declares independence.
The island has been claimed by Beijing since the nationalist government of Chiang Kai-shek fled there from mainland China after being driven out by the communists in 1949.'Not legally possible'
Ban said on Tuesday that Taiwan's application to join the UN was not accepted for legal reasons because of a 1971 UN resolution that gave China's seat to China.
"This has been the official position of the United Nations and has not changed since 1971.
"This matter ... was very carefully considered by the secretariat, and in light of resolution 2758 it was not legally possible to receive the purported application for membership."
Taiwan split from mainland China at the end of the Chinese civil war in 1949.
Beijing regards Taiwan as part of its territory, and says it will use force if it declares independence.
Beijing and Taipei both claim they are the legitimate government of all China.
Taiwan has been a multi-party democracy since 1996.
Taiwan's defence ministry says China now has nearly 1,000 missiles aimed at the island.
The US is Taiwan's major arms supplier and has warned China that any attack would be viewed with "grave concern".
The self-ruled island of 23 million people says the resolution no longer applies to present-day Taiwan, which is recognised by only 24 countries.
The Marshall Islands, representing that group, asked for Taiwan's application to be considered by a new general assembly session.
That request will be considered on Wednesday by a key general assembly committee.
But with China holding a veto in the 15-member security council and overwhelming support in the 192-member general assembly, Taiwanese officials say they know the UN bid will fail.
Despite this, Chen Shui-bian, Taiwan's president, is planning to hold a referendum on UN membership alongside presidential elections in March, just months before Beijing hosts the Olympics.
In a strongly worded statement after Sunday's rallies in support of UN membership, the Chinese government said it was preparing for a "serious situation" in Taiwan.
Mark Seddon, Al Jazeera's correspondent at the UN, said the Chinese would take a hard line on Taiwan but were unlikely to launch military action.
He said that while China has been increasing the number of missiles aimed at Taiwan, actually going to war was another matter.
Saying there was a lot a sabre-rattling going on, he pointed out that the US remained treaty-bound to defend Taiwan if it is attacked.