We present a first analysis of parton-to-pion fragmentation functions at next-to-next-to-leading order accuracy in QCD based on single-inclusive pion production in electron-positron annihilation. Special emphasis is put on the technical details necessary to perform the QCD scale evolution and cross section calculation in Mellin moment space. We demonstrate how the description of the data and the theoretical uncertainties are improved when next-to-next-to-leading order QCD corrections are included.