The pair, who were nicknamed "Bennifer" when they first dated in the frenzied tabloid celebrity days of the early 2000s, had rekindled their relationship almost two decades later.
But Lopez on Tuesday filed divorce papers at a Los Angeles court, Hollywood trade outlet Variety and celebrity gossip website TMZ said.
A representative for Lopez declined to comment. Affleck's publicist did not immediately respond to an AFP request for comment.
It was the fourth marriage for pop singer-turned-actress Lopez, 55, and the second for Oscar-winning movie star and director Affleck, 52.
The pair first met in 2002 on the set of the widely panned movie "Gigli."
They became a media sensation as they started dating and announced their engagement.
But they postponed their planned 2003 nuptials, and announced their relationship was over in early 2004.
"Bennifer" set the internet alight again in 2021 when photos of them together again began circulating.
"It's a beautiful love story that we got a second chance," Lopez said in an interview around that time.
Lopez and Affleck announced their engagement in April 2022, and the A-list lovebirds wed in Las Vegas in July.
They made it official again the following month in a lavish ceremony at the "Good Will Hunting" star's 87-acre (35-hectare) estate in the southeastern US state of Georgia.
Among the Hollywood types in attendance at the three-day affair were longtime Affleck pal Matt Damon and director Kevin Smith.
The couple reportedly bought a $60 million home together in Los Angeles last year.
But rumors of marital troubles emerged in the entertainment press and on social media earlier this year.
Fans noted that Lopez celebrated her 55th birthday without her husband last month, and TMZ said they had sold their joint home, with Affleck moving into a luxury bachelor pad.
People magazine said relations became strained because of their different approaches to celebrity.
"She likes to open her heart to her fans and to the world," the magazine quoted an unnamed source saying.
"He is more introspective and private. This has been difficult day-to-day."
Divorce papers listed the couple's date of separation as April 26, 2024, according to TMZ, which said the pair are no longer on speaking terms.
Lopez was previously married to actor Ojani Noa, dancer Cris Judd and singer Marc Anthony, with whom she shares twins Max and Emme.
Affleck was married to actress Jennifer Garner and they are the parents of Violet, Seraphina, and Samuel.