I have learnt that the following structure is possible:
has/have known + object + (to) do
(a) I've never known him pay for a drink.
(b) I've never known him to pay for a drink.,
..the sentences above are both grammatically correct.
As regards the following sentences:
1. I never knew him do anything illegal.
2. I never knew him to do anything illegal.
only #2, as you said, is correct,
Question: Is the structure in bold is true when the verb know is used in the perfect aspect, that is, both the full infinitive and bare infinitive are used? In simple tenses, only the infinitive with to is used, isn't it?