As previously noted, lying requires a deliberated intent to deceive, while writing fiction does not. Most autobiographies are filled with lies, since any false fact presented as the truth would be a lie. Fiction is entirely counterfactual, there's generally no attempt to deceive. Even when an author makes claims about the real world which are wrong and the author knows they're wrong, they may fall under artistic license. I'm not sure it's possible to lie in fiction, though it's certainly possible to misrepresent. If I write a story an alternate history where Shay's Rebellion succeeds and establishes a communist state, that's a clear misrepresentation of Shay's Rebellion.
I might argue that I'm employing artistic license to make a point about history. You might think that I go beyond artistic license and it's just an unrealistic skewing of facts to serve a not-very-clever point (an issue I have with a lot of alternate history), but it wouldn't be a lie, even though I know Daniel Shays was a communist. It wouldn't be a lie even if I thought Daniel Shays were a filthy communist and set out writing that story to discredit him.
As for being a good liar vs being a good writer: I'm a terrible liar and a good writer of non-fiction, which of course does not require lying. I have a harder time writing fiction, but that's because I have difficulty writing compelling characters. I have no idea whether I'm any good at it, but Lester Del Rey was notorious in the SF community for his ability to lie with ease and defend his lies against attempts to discredit them, which suggests that most SF writers are not liars of the caliber of Lester Del Rey.