After Melrose Place ended in 1999, Locklear was cast in the sitcom Spin City (initially opposite Michael J. Fox and later opposite Charlie Sheen). The series ended in 2002, but Locklear earned two Golden Globe Award nominations for Best Actress in a Television Series – Comedy. In 2002, Locklear had a brief recurring role on the sitcom Scrubs. In 2003, she starred in a pilot for her own comedy series, Once Around the Park, but this was unsuccessful. The same year, Locklear appeared in the theatrical film Uptown Girls. In 2004, Locklear made a guest appearance on the sitcom Two and a Half Men, which starred her former Spin City co-star Charlie Sheen. She then starred in the short-lived television drama series LAX set in the airport of the same name. She was also executive producer on the series, but it was cancelled after 11 episodes. In 2005, Locklear appeared in the theatrical film The Perfect Man with Hilary Duff. The same year, she had a brief recurring role on the series Boston Legal, which starred her former T. J. Hooker co-star William Shatner. She was also featured in a Biography Channel special. In 2006, Locklear starred in another television pilot, Women of a Certain Age, but this was unsuccessful. She appeared in the music video for country singer Toby Keith's single "Crash Here Tonight" that same year.