Both sentences are grammatical. The first one is actually not really a question unless the speaker's intonation rises towards the end. Without the right intonation the sentence is just negative and is usually written without a question mark: He didn't say anything about this.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.