John Locke was an interesting character because he was a deconstruction of the Chosen One trope. He believed he was special by his own right, he believed that a great destiny awaited him, and he ended up pissing away his life in waiting for his destiny to happen.
He was a narcissist with a megalomaniac complex who thought he was too good for the environment he lived in - at school, later in life at work, for his relationships... which was why he never pursued an education even though he was clearly intelligent enough to have one - but who blamed himself for it never coming, which translated into internalised self-hatred and a need for external approval (his daddy issues), conveying how much he needed confirmation of his own unique, special status.
Because he believed he had one fixed great destiny he often did not care to act accordingly and that's why he comes across as amoral - he believes he's entitled greatness, sooner or later. But as life piles up and shit happens, he becomes more and more insecure, still hanging on to that last thread of self-confusing, pure faith ('don't tell me what I can't do!') and starts rebelling against himself until someone, for once in his life, talks him into taking an initiative (Matthew Abbadon posing as the sage orderly). When he does, he finds the island and starts believing again, especially after it miraculously heals his legs, that he's again in the right track to fulfilling his destiny.
What he was was a sad, obsessed man who believed he was destined to greatness regardless of having to actually work towards it and because of that didn't see the need to adhere to any moral or social codes, trampling all over whoever stood in his path without thinking twice (Boone and Naomi, anyone?) justifying it as looking after the self-fulfillment of his 'destiny'. In the end he was unprepared for the high stakes he believed he could take on and let himself be manipulated by people who falsely fed into his superiority delusion, like it had happened before with his father, showing that more than anything else John Locke was so fixated in himself that he was unable to learn from what happened to him. In the end, this position meant his demise and almost the destruction of Earth.
Sure, there was that exchange between Ben and Locke in the sideways universe during the finale where Ben acknowledged that Locke was special and he was jealous, that seems to throw this whole character study under the bus. I'm going with a) the writers writing out of their asses (because they never did that on LOST, no) or b) Ben missing the point. Even Richard Alpert, who is, let's face it, far wiser than Ben (and while we're at it, Jacob, who never showed himself to Locke), recognised, upon inspecting a young John Locke, that he wasn't fit to fulfill the destiny he later came to want so dearly (and that went to Hurley eventually). He kept trying because he believed that future!Locke was an emissary from Jacob but you can see his reluctance.
He's a cautionary tale about the dangers of individualism in modern society (contrasting with Jack's 'live together or die alone' philosophy which paid off in the end) and the hyper heightened culture of the self (some would call it the 'snowflake culture'). Some people say that in the grand scheme of the show, in the battle between science and faith, faith won; faith might have won, but not John Locke's.