SHADES OF BLUE -- "Pilot" Episode 101 -- Pictured: Jennifer Lopez as Detective Harlee Santos -- (Photo by: Peter Kramer/NBC)"Shades of Blue." Her NBC cop drama is ending after the upcoming third season, which premieres June 17.

The show starred Lopez as Detective Harlee Santos, a single mother who works under a law-bending lieutenant (Ray Liotta). At the start of the series, she was pushed to cooperate with the FBI in an anti-corruption investigation against her unit.

In its second season, "Shades of Blue" averaged 7 million viewers and a 1.4 rating in the advertiser-coveted demographic of adults 18-49 (including seven-day delayed views).

"I have enjoyed producing and starring in this beautifully complicated world and playing such an empowering yet flawed character — a woman, a detective, but, first and foremost, a mother," said Lopez, who also produced the show.

"Now looking at it with a little distance, playing Harlee strengthened me and helped me grow into a more self-assured woman. It's crazy how some parts permeate your soul and change you forever and for that I am grateful. We crafted a poetic three-season arc on how her journey ends, which is true redemption. The way only Harlee could have done it — the hard way, the road less traveled. I thank NBC and all the talented actors, writers, crew and producers for going on this journey with us!"

Lopez's relationship with NBC won't end with "Shades of Blue," though. Season 2 of her reality competition show "World of Dance" premieres in June and she will return as a judge. She is also set to star in the network's live musical "Bye Bye Birdie," which has already been delayed twice.

The star is busy elsewhere, too. She has several film projects on deck and is currently doing a Las Vegas residency, which runs through September.