1. When did he live in this town?

2. When did he start to live in this town?

(Are both grammatical?

Both are grammatical, but the second sentence is not used. In place of 2, you could use these:

When did he move to this town?
How long has he lived in this town?