A fungal ten-eleven translocation (TET) dioxygenase homolog, CcTet, is found to have both 5-methylcytosine (5mC) and N6-methyladenine (6mA) demethylase activity. Structure-based engineering of CcTet yielded a 6mA-specific demethylase, offering a useful tool for the manipulation and functional study of 6mA.