A conservative legal-advocacy group is enlisting ministers to use their pulpits to preach about election candidates this September, defying a tax law that bars churches from engaging in politics.

Alliance Defense Fund, a Scottsdale, Ariz., nonprofit, is hoping at least one sermon will prompt the Internal Revenue Service to investigate, sparking a court battle that could get the tax provision declared unconstitutional. Alliance lawyers represent churches in disputes with the IRS over alleged partisan activity.

The...