What makes the main character likeable? Sounds gross.
For example, Dexter is killing bad people (at least to start with).
Like Dexter (who I'm not sure was ever really "likeable") he has a kind of "moral code", and acts like a really nice person maybe 80-90% of the time. And when he does something bad, he always has some self-justification about how he's really just trying to protect someone or make them happy. But I think it's most of all about getting us as viewers invested in the sheer
challenge of the thing: he's constantly put in these jams he has to get out of somehow, and you end up rooting for him on some level just because it's fun to see how he overcomes difficult obstacles. (Also a lot of the appeal of
Breaking Bad, I think.)
Oh, plus another trick: fill out the role gallery with truly unlikeable supporting characters, so that he looks better by comparison and you don't mind so much when bad things happen to them.