Catalysis of the reaction: 10-formyltetrahydrofolate + 5'-phosphoribosyl-5-amino-4-imidazolecarboxamide = tetrahydrofolate + 5'-phosphoribosyl-5-formamido-4-imidazolecarboxamide.
10-formyltetrahydrofolate:5\'-phosphoribosyl-5-amino-4-imidazole-carboxamide N-formyltransferase activity