New answer
I found a new solution that is 2 moves better than my previous one!
Big thanks to the answer by Retudin for the new pawn structure idea!
Pieces:
All 32 pieces have exactly 2 legal moves.
Moves:
(16 for each side, then one more for white.)
1. a4 h5 2. c4 f5 3. Nh3 Nc6 4. g4 Ne5 5. Rg1 Nf7 6. Rg3 b5 7. Rb3 Rb8 8. d4 e5 9. Ng1 Rb6 10. Na3 Rg6 11. Nc2 Ba3 12. Bh6 Rg5 13. Rb4 Nf6 14. Qb1 Kf8 15. Qa2 Kg8 16. Rb1 Ne8 17. Qa1
Position:
Old answer
Pieces:
All 32 pieces have exactly 2 legal moves.
Moves:
(18 for each side, then one more for white.)
1. Nc3 b5 2. Nf3 g5 3. h4 Bg7 4. a4 Bd4 5. Rh2 Bb6 6. d4 Bb7 7. Bf4 Be4 8. Be5 Bg6 9. Bg7 Nh6 10. e4 Nf5 11. Bc4 Nd6 12. Bd5 Na6 13. Bb7 Nc5 14. Kf1 Ne6 15. Bf8 Ng7 16. Bc8 Nb7 17. Qb1 f5 18. Nd1 c5 19. Ne1
Position: