ungrammatical (adj.)
1650s, from un- (1) "not" + grammatical. Related: Ungrammatically.