Mustafa Mousab Alowemer – who came to the US from Daraa, Syria, three years ago – is charged with leading an Islamic State-inspired plot.
As Mr Alowemer collected bomb-making materials, he was in contact with an undercover FBI agent, detectives say.
The FBI says he recorded a video of himself pledging allegiance to IS.
In one message on social media to an FBI agent, he allegedly wrote in Arabic “I’m burning from inside for what happened to the Muslims in New Zealand”, a reference to the 15 March attack on two mosques in Christchurch.
He also discussed targeting individual US soldiers, a local Yazidi community and a Shia mosque, according to investigators.
“Targeting places of worship is beyond the pale, no matter what the motivation,” Assistant Attorney General John Demers said in a statement announcing Wednesday’s arrest.
“The defendant is alleged to have plotted just such an attack of a church in Pittsburgh in the name of ISIS.”
Court documents show that Mr Alowemer wanted to plant a bomb in the middle of the night at the Legacy International Worship Center.
He said the church was chosen for attack in order to “take revenge for our ISIS brothers in Nigeria”, according to the criminal complaint.
In a statement on Facebook, Pastor Michael Day of the Legacy International Worship Center praised the arrest,…