Captain Zoe Andersen, played by Mercedes Mason, started out on The Rookie as a major regular character. So, fans were shocked when she was killed in Season 1, Episode 16, "Greenlight." The episode delivered an unexpected twist when Andersen received a fatal wound during a shootout against a criminal gang. She was the first series regular to leave the series, but she wasn't the last.
Source:https://www.cbr.com/the-rookie-why-mercedes-masons-zoe-andersen-was-killed-off/