Locklear, 46, is best-known for her roles on "Dynasty," "T.J. Hooker," "Melrose Place" and "Spin City."
Lifetime said the actress will play a divorced mother of two on the brink of her 40th birthday who, while on a Hawaiian holiday, finds romance with a much younger surf instructor.
Based on Jane Porter's popular novel, "Flirting with 40" is set to premiere in December on Lifetime Television.
Locklear also starred in "Nora Roberts' Angels Fall," the most-watched Lifetime Original Movie of 2007, which drew nearly 5 million viewers.
"We're thrilled to welcome Heather back to Lifetime after the huge success of 'Angels Fall.' It's obvious that our viewers adore her. This movie is an honest look at how sometimes women can become stuck in first gear, yet finding the courage to make a dramatic change in their lives can truly be invigorating, even to the chagrin of friends and family," Lifetime's Tanya Lopez said in a statement.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Exploding whale video goes viral on Internet