It’s not correct grammar, as the word “ever” should not be used that way. Remove “ever” and it’s fine. Alternatively, it would be correct if we re-stated it as a negative (He has never lived in China for three years) or as a question, although it may not be the clearest way of putting it: “Has he ever lived in China for three years?” This would be asking if at any time in his life he lived in China for a period of three years. Note that he is still alive; if he were dead, we would use the simple past. Actually, most Americans would use the simple past anyhow. The purpose of using the present perfect is to emphasize that the past experience of living in China for three years has an effect on the present. For example, he is now fluent in Mandarin, since at one time in the past he lived in China for three years.
Let me know if my explanation helped you.