This question about Avatarhood and his previous lives if any is taken up by Sri Aurobindo himself in Essays on the Gita as cited below.
‘The question then arises, and it is the sole real difficulty, for here the intellect falters and stumbles over its own limits, how is this human mind and body assumed? For they were not created suddenly and all of a piece, but by some kind of evolution, physical or spiritual or both. No doubt, the descent of the Avatar, like the divine birth from the other side, is essentially a spiritual B.G.4.6 phenomenon, as is shown by the Gita’s ātmānaṁ sṛjāmi, it is a…