I personally would choose MJ, just subjectively. Idk if MJ did anything notoriously better than Lebron. Both great shooters, consistent, versatile, and playing at a great level even at their age (remember that MJ came back from his 2nd retirement at 38 y/o and put pretty decent numbers and still left his mark on the court).
As of any sport, it's pretty difficult to choose the greatest of all time only based in comparisons, because sports evolve and there aren't that much examples where the "greats" play against each other (tennis could be one, Federer, Nadal and Djokovic are truly at least on the top 5 of tennis historically).
When people compare Lebron with MJ for example, they played in different generations, different rivals, different conditions.
Both are/were dominant at different times. Another example? Football: Messi, Pele, Maradona.
TL;DR: first paragraph, the rest is me going on and on.