Then-U.S. Attorney Preet Bharara announced D'Souza's conviction at the time.
"Dinesh D'Souza attempted to illegally contribute over $10,000 to a Senate campaign, willfully undermining the integrity of the campaign finance process," Bharara said. "Like many others before him, of all political stripes, he has had to answer for this crime – here with a felony conviction."
Bharara was fired by the president shortly after Trump took office in 2017, and has since become an occasionally vocal critic of the president.
In a tweet, he defended the lawsuit and conviction against D'Souza in a response to Trump's announcement to grant the pardon.
D'Souza sent a counterpunch on the social media platform, claiming that Bharara, who was born in India, "want to destroy a fellow Indian American to advance his career."
Later on Thursday, Trump told reporters he was considering pardoning Martha Stewart, who was convicted in March 2004 of obstructing justice and lying to investigators regarding a stock trade she made three years earlier. Stewart served five months in jail.
The U.S. attorney for the Southern District of New York at the time was James Comey, who was fired as FBI Director in May 2017 by Trump.
Trump also said he was considering a commuted sentence for Rod Blagojevich, ex-governor of Illinois who is serving out a 14-year sentence in a Colorado prison on bribery and corruption charges.
In his 2016 film, "Hillary's America: The Secret History of the Democratic Party," D'Souza implied that his felony conviction was a politically motivated attack by the government in retaliation for an earlier film of his about the Obama administration, according to The New York Times' review of the film.
The right-wing firebrand was heavily criticized in February for mocking the students who survived the mass shooting at a Parkland, Florida, high school that left 17 students and adults dead a week earlier. He later apologized, saying his tweet "was insensitive to students who lost friends in a terrible tragedy."
After pleading guilty, D'Souza was sentenced to spend an eight-hour day each week in community service as part of a five-year probationary term, according to the Southern District of New York. He also had to attend weekly counseling sessions and pay a $30,000 fine.
Texas Sen. Ted Cruz, an ally of both Trump and D'Souza, applauded Trump's decision in a tweet of his own.
The president has used his pardon power five other times since taking office, including the controversial pardoning of former Sheriff Joe Arpaio in August 2017.
Arpaio, who had campaigned for Trump, had come under fire for the treatment of prisoners in the Maricopa County jail. The law enforcement officer, who bragged of being "America's toughest sheriff," was convicted of contempt of court in Arizona.
In April, the president also pardoned Scooter Libby, a former advisor to Vice President Dick Cheney who had been convicted of obstruction of justice, false statements and perjury.
Trump's most recent pardon was granted posthumously to Jack Johnson, who was convicted in 1913 by an all-white jury for violating a law prohibiting the transport of women across state lines for "immoral" purposes.
D'Souza did not immediately respond to CNBC's request for comment.