1. This is the way he walks.

2. This is how he walks.
3. This is the way in which he walks.
4. This is the way that he walks.
5. This is in which he walks.
-------------------------------
Except #5, are all grammatical?

yes but #5 is not grammatical