- I know him to be honest.
The Oxford Learner's Dictionary explains this construction in definition 5 for know:
reputation [transitive, usually passive] to think that somebody/something is a particular type of person or thing or has particular characteristics
know somebody/something as something It's known as the most dangerous part of the city.
know somebody/something for something She is best known for her work on the human brain.
know somebody/something to be/do something He's known to be an outstanding physicist.
The infinitive clause "to be honest" is serving as an object complement to "him," which is the direct object of the verb "know." (John Lawler gives a concise explanation for the terms "infinitive clause" and "object complement" here.) The Learner's Dictionary documents this use of the infinitive as a regular construction that can be used in most contexts. "I know him to kick doors down" and "I know him to rise to the occasion" work, and so does "I know him to be honest." They all describe something about the person's reputation, or the habits of that person.
- I know him being honest.
This has no corresponding dictionary entry, indicating that the construction is not regular. I read "being honest" as a gerund clause serving as the object complement of "him." It makes sense but isn't something I would likely say.
I went as far as trying to find the gerund-based phrasing in the wild. Corpus of Contemporary American English search results confirm that "know him being" (0 results) is far less common than "know him to be" (with 31 results). In fact, on the largest corpus (NOW) there are only 3 results for "know him being." I note the context beforehand in parenthesis and include the link in that parenthesis:
(oral interview, Irish Examiner) I looked him up after the movie and he seems to be a bit of a go to guy in terms of horror so you’ll probably know him being a horror fan.
(oral interview, Irish Examiner) We obviously know him being a really good player...
(photo caption, Lifestyle) U may not be with him all the time like most of my friends and classmates but I know him being away has made the country safer and more peaceful each day.
Note the informal register of all three contexts. These are people (presumably native speakers and writers) expressing themselves. The second one functions most like number 1 - the object "him" is "being a really good player." The third one is a different beast: "him being away" serves together as the subject of a new clause initiated by "I know." The entire clause represents what the speaker knows.
The first one involves yet another function. The gerund clause most likely describes the subject, not the object. The interviewee is referring to "you" (the interviewer) as "a horror fan." In more rigorous writing proximity would make the relation more clear:
You, being a horror fan, will probably know him.
In short, the gerund construction is irregular enough that it sometimes comes up in usage but requires careful attention to context to distinguish usages focused on someone's reputation from other items. It is jostling enough that the construction is discouraged in more regulated contexts. I would avoid using a gerund as an object complement with "I know him" if the sentence were standalone.