It feels like he had everything to lose and nothing to gain by defending his homeland. Worst case (relative to his perspective), Virginia rejoins the Union without slavery. Best case, Virginia probably still eventually rejoins the Union but abolishment would have to be revisited later. Some Americans have a high opinion of him, but I'm failing to see what his contribution did besides extend suffering over issues he seemed to only be lukewarm on.
Not to discourage further discussion, but this answer by /u/secessionisillegal goes into fine detail and analysis about the issue. In summary, what Lee said were his reasons doesn't align with his actions, and there are good reasons to suspect that Lee indeed had pro-southern, pro-slavery sympathies. Especially considering, as explained here in the same thread by /u/Georgy_K_Zhukov and others, Lee was far from a "nice" slave owner, if those even existed.