Recent studies demonstrate that air quality improved during the coronavirus pandemic due to the imposition of social lockdowns. We investigate the impact of COVID-19 on air pollution in the two largest cities in Taiwan, which were not subject to economic or mobility restrictions. Using a difference-in-differences approach and real-time data on air quality and transportation, we estimate that anthropogenic air pollution from local sources increased during working days and decreased during non-working days during the COVID-19 pandemic. This led to a 3–7 percent increase in CO, O
3
, SO
2
, PM
10
and PM
2.5
. We demonstrate that the increase in air pollution resulted from a shift in preferred mode of travel away from public transportation and towards personal motor vehicles during working days. In particular, metro and shared bicycle usage decreased between 8 and 18 percent, on average, while automobile and scooter use increased between 11 and 21 percent during working days. Similar COVID-19 prevention behaviors in regions or countries emerging from lockdowns could likewise result in an increase in air pollution. Taking action to reduce the transmissibility of COVID-19 on metro cars, trains and buses, could help policymakers limit the substitution of personal motor vehicles for public transit, and mitigate increases in air pollution when lifting mobility restrictions.