How can a Hobgoblin Captain be used as a player character?

On my last session as DM, a party of five level 3 players managed to make a Hobgoblin Captain become friendly with them and ultimately join them.

There’s a new player who’d love to take the character of the Hobgoblin (so it would be six players).

I find it really interesting to make him able to do so, but I can’t see how to make it a PC, able to level up and so on, while keeping him as similar as possible to the original monster, and obviously not making everything unbalanced.

How could a Hobgoblin Captain become a playable character, which can level up as players do? (It doesn’t to be exactly the same as it is in the monster manual)