IPA: /nɒŋˈɡræmətɪkəl/
KK: /nɔŋˈɡræmətɪkəl/
Not following the rules of grammar; incorrect in terms of grammar.
The sentence was considered nongrammatical because it did not follow standard grammatical rules.
Nongrammatical → It is formed from "non-" (meaning not) and "grammatical" (from Greek "grammatikos", meaning relating to letters or grammar). The word "nongrammatical" means not relating to grammar or not conforming to grammatical rules.
Think of 'non-' meaning 'not' and 'grammatical' relating to 'grammar' — so nongrammatical describes something that does not follow grammar rules.