Like other oxygenic photosynthetic organisms, diatoms produce glycolate, a toxic intermediate, as a consequence of the oxygenase activity of Rubisco. Diatoms can remove glycolate through excretion and through oxidation as part of the photorespiratory pathway. The diatom Phaeodactylum tricornutum encodes two proteins suggested to be involved in glycolate metabolism: PtGO1 and PtGO2. We found that these proteins differ substantially from the sequences of experimentally characterized proteins responsible for glycolate oxidation in other species, glycolate oxidase (GOX) and glycolate dehydrogenase. We show that PtGO1 and PtGO2 are the only sequences of P. tricornutum homologous to GOX. Our phylogenetic analyses indicate that the ancestors of diatoms acquired PtGO1 during the proposed first secondary endosymbiosis with a chlorophyte alga, which may have previously obtained this gene from proteobacteria. In contrast, PtGO2 is orthologous to an uncharacterized protein in Galdieria sulphuraria, consistent with its acquisition during the secondary endosymbiosis with a red alga that gave rise to the current plastid. The analysis of amino acid residues at conserved positions suggests that PtGO2, which localizes to peroxisomes, may use substrates other than glycolate, explaining the lack of GOX activity we observe in vitro. Instead, PtGO1, while only very distantly related to previously characterized GOX proteins, evolved glycolate-oxidizing activity, as demonstrated by in gel activity assays and mass spectrometry analysis. PtGO1 localizes to mitochondria, consistent with previous suggestions that photorespiration in diatoms proceeds in these organelles. We conclude that the ancestors of diatoms evolved a unique alternative to oxidize photorespiratory glycolate: a mitochondrial dehydrogenase homologous to GOX able to use electron acceptors other than O.