The title compound, (C4H7N2)2[AlP2O7(OH)], is a one-dimensional extended-chain aluminophosphate prepared by a solvothermal synthesis from an alcohol system. The infinite [AlP2O7(OH)]2- chains composed of AlO4, PO2(=O)2 and PO2(=O)(OH) tetrahedra are linked via hydrogen bonds to the 2-methylimidazolium cations.