Sorta? He allowed Smith to infect him, while his body was physically connected to the Source, allowing the Source to delete Smith from the Matrix.
But Neo is just a creation of The Architect. They could just put a new copy of The One program back into his body and put him back in a pod.