The Senate Leadership Fund released an ad Wednesday going after Brooks ahead of the August primary to fill the seat previously held by Attorney General Jeff Sessions.
The ad splices together clips of Brooks speaking out about then-GOP presidential candidate Donald Trump while attempting to tie him to House Minority Leader Nancy Pelosi (D-Calif.) and Sen. Elizabeth Warren (D-Mass.).
"Mo Brooks attacked President Trump, siding with them — not Alabama conservatives," a narrator says in the ad, which portrays Brooks alongside the Democratic figures.
The Republican lawmaker repeatedly attacked Trump during the GOP primary, saying he couldn't be trusted and calling him a "serial adulterer."
Since Trump won the election, Brooks has become a vocal supporter of the president.
On Monday, Brooks released a new Senate campaign ad that said if he is elected, he will fight to have Trump's U.S.-Mexico border wall funded, even if that means a government shutdown.
But his past criticisms of Trump could pose a problem for him in the race in Alabama, a state which Trump won handily in last year's presidential election.
The GOP super PAC ad, titled "Trust," is part of the group's $2.5 million ad campaign in Alabama’s upcoming special election.
Steven Law, the head of the Senate Leadership Fund, said the special election will be a "test" to see if an "anti-Trump" candidate can win.
"The Republican primary for U.S. Senate in Alabama will be the first test to see whether someone as stridently anti-Trump as Mo Brooks can survive in a state that is so overwhelmingly supportive of the President,” Law said in a statement.
The primary is scheduled for Aug. 15, and it will be followed by a runoff in late September and a general election in December.
Brooks is one of several candidates in the primary challenging Sen. Luther Strange, who was appointed to the seat earlier this year by then-Gov. Robert Bentley (R).
A Brooks campaign spokeswoman did not immediately return a request for comment.