The Islamic Cultural Centre was targeted on Sunday while a meeting was taking place inside. Nobody was injured during the incident.
Stuart Harness, 33, and Gavin Humphries, 37, both of Dixon Avenue, Grimsby, were charged with arson with intent to endanger life.
They were both remanded in custody at the town’s magistrates’ court.
Both men are due to appear at Grimsby Crown Court on 7 June.
It was the second time the centre on Weelsby Road had been targeted in a week.
Eleven teenagers, aged 16 and 17, were arrested after the mosque and some parked cars were attacked on Thursday.
Humberside Police said five of those had been released without charge while the others had been released on bail while inquiries continue.