This is one of those annoying words which has two contradictory meanings at the same time. Today, the general sense of the word is "lacking merit", and this sense was around in Shakespeare's time, having entered the language in the 15th century from Latin: Macduff, mourning for his murdered children, blames himself: "'Not for their own demerits, but for mine,Fell slaughter on their souls" (Macbeth IV.iii.225). But another sense also operated in Early Modern English, which arrived in the language in the 14th century from French, which had the opposite meaning of "merits, deserving". And this is the one you need when Othello says to Iago, "my demeritsMay speak, unbonneted, to as proud a fortuneAs this that I have reached" (Othello, I.ii.22), or when Sicinius says to Brutus, "Opinion, that so sticks on Martius, shallOf his demerits rob Cominius" (Coriolanus, I.i.270).
David Crystal is author, with Ben Crystal, of Shakespeare's Words, published by Penguin