There was once a time that it was hard to imagine The Walking Dead without Lori Grimes. A part of the AMC series since the very beginning, Lori was Rick's wife, Carl's mother, and one of the most divisive characters in the entire TWD Universe's history. While that controversy started pretty early on due to her relationship with Rick's friend Shane, she did - in all fairness - think that her husband was dead. It was the controversies that came after that that made it hard for fans to empathize with her.
Lori was an incredibly complex character who struggled with the return of Rick Grimes from the dead, the fallout of her own actions, and Shane's downward spiral. But she loved Rick and Carl with her life, along with her unborn baby Judith. So when it came time to lay down her life for that very family, she never hesitated.
When Lori dies in The Walking Dead (and how it happens)
Lori dies in The Walking Dead season 3 episode 4, titled "Killer Within", when she goes into labor and is unable to deliver the baby as she had hoped. Due to an attack on the prison, she, Carl, and Maggie are separated from the rest of the group, leading to Lori begging Maggie to perform a deadly Caesarean section on her to effectively cut baby Judith out of her.

An emotional moment ensues in which Carl and Lori say goodbye to each other. Lori tells him that he's "the best thing [she] ever did" and hugs him tightly, telling him not to let this world beat him. She then orders Maggie to do it and passes out due to the immense blood loss. Shortly afterwards, Judith is born.
Rick's emotional breakdown upon finding out about Lori's death went viral because of the distraught, guttural performance that Andrew Lincoln turned in. After that heartbreaking moment, Rick went to look for her body only to find out that a bloated walker had apparently eaten her remains. Out of anger and grief, he launched a bloody assault on the creature.
This proved to be a major moment of change for the show, as finding Lori and Carl was Rick's purpose in the beginning of the series while protecting them had been his purpose from then onwards. Losing Lori drove him down a dark path, from which he nearly didn't come back. But, eventually, Carl and baby Judith helped pull him back from the brink.
Sarah Wayne Callies argued that Lori had to die
The Walking Dead was known for deviating from the Robert Kirkman comic books that it was adapting, but Sarah Wayne Callies argued that one of the few story beats that had to remain was Lori's death. The star knew heading into the show that Lori died in the comics and she felt that the same thing had to happen in the TV series because of what it meant for Rick's journey.
Speaking to The Hollywood Reporter in the aftermath of "Killer Within" airing back in 2012, she revealed that Rick's story couldn't have played out the way it did without a major catalyst like this:
"I argued that it was necessary to kill Lori and I feel very strongly that for all of the other deviations we may have from the comic book, killing Lori does something to Rick that is vital for the story and can’t be done any other way.”
Callies was perfectly happy with the character's arc having a shelf life because it had one in the comics too, so it was all about crafting a farewell for her that could service the character as well as the overarching storyline. And that's why this death is better-received than the version that plays out in the comics - and it marks a significant change from the source material as a result of that.

In the TWD comics, Lori dies during the Governor's attack on the prison (which would have placed it in season 4 if the show had stayed completely true to the source material). She is shot in the back by Lilly Caul as she is running away, which results in her falling dead instantly and unfortunately crushing baby Judith to death in the process. It was an extremely dark outcome for both characters and perhaps a little too dark for TV - even on a show like The Walking Dead. And so, it was reimagined here because, while Lori's death broke Rick, the birth of Judith gave him something to keep living for.
To say that Callies' advocating for the show to kill her character off was brave would be an understatement. Not only did it result in the narrative staying true to the comics' storyline, it improved upon the character's death itself - allowing her to go out in a way that serviced the character as well as the storyline. Lori's sacrifice was brave, motherly, and downright admirable; it's what the character was capable of when the writing was at its best and a reminder of all she could have been if she wasn't utilized wrong throughout the second season.
The Walking Dead's original showrunner Frank Darabont praised her commitment to bettering the show. Callies revealed in an interview with Collider that he actually told her: “I’ve never had a leading lady argue her way off the show.” He had a way around the character's death in his vision of the show (that never came to fruition) but Callies knew that Lori had to die.

In bringing that character death to life, she wanted to achieve a semblance of redemption for Lori, who had made some pretty problematic choices throughout her time on the show.
"I wanted a sense of redemption in her marriage and a sense of redemption with Carl. I don’t think either of those were achieved completely, because that would tie things up in a package that is far too neat for our show, but we took steps down that path..."
It goes without saying that everyone involved accomplished their goal. Lori's death remains one of the most powerful, moving, and heartbreaking moments in The Walking Dead's long history and Callies' performance (along with Chandler Riggs and Lauren Cohan's) is outstanding. Considering that so many people struggled with Lori as a character, it's a testament to all of them that they pulled this off so effortlessly. We all wanted Lori to live and that's how you know the character's send-off served her arc well.
All the respect in the world to Sarah Wayne Callies!
