West Yorkshire Police spoke to the writer and told him to cease contacting Stephanie Hayden, who he has rowed with on Twitter.
Ms Hayden reported him for "transphobia" after he referred to her as "he" and for "deadnaming" her by referring to her by names used before she transitioned.
Linehan has said: "The police asked me to stop contacting someone I had no intention of contacting.
"It was a bit like asking me to never contact Charlie Sheen."
Ms Hayden, a 45-year-old from Leeds, is also suing the 50-year-old Irish writer, also known for being behind Black Books and The IT Crowd, in the High Court.
Linehan, who lives in Norfolk, has tweeted calling her Stephanie/Tony/Steven", references to her former names.
As included in her lawsuit, Linehan also wrote: "I don't respect the pronouns of misogynists, stalkers or harassers, and Tony is all three."
The claims are refuted by Ms Hayden.
Ms Hayden said: "I don't take kindly to a public figure tweeting about me referring to me as a man and putting my legal name in quotation marks to suggest it's not valid."
Police can issue harassment warnings to deter individuals from further behaviour. They are not convictions or cautions, but do appear on enhanced criminal records checks.