They haven't yet revealed how Locke ended up in a wheelchair. They've shown flashbacks of before and after he was in the wheelchair. In the episode where they first revealed the wheelchair they show him at his office job, he was always sitting. He then went to Australia because he wanted to go on a safari (or some kind of adventure) and they wouldn't let him go on the safari because of his wheelchair. He was in the chair before he went to Australia, they just didn't show it to us until he was there.

He didn't end up in the wheelchair as a result of the kidney surgery either, they showed him walking after that.

After he hurt his leg on the island he refused to use the wheelchair, he used crutches instead. Jake wanted him to use the wheelchair, but Locke wouldn't. No one on the island knows that he was in a wheelchair prior to coming to the island.