Although the meaning of this translation is good, it does not conform to the expression habits of China people.
I never expected to meet you in the library.
I didn't expect to meet you here.
Hey, what brings you to the library!
Yo, you are a rare visitor, meeting you here!
The implication of this sentence is that gentlemen usually don't like reading and seldom go to the library, which is ironic. Of course, this is said among people who know him very well.
You can understand it as making a list of "people I would expect to see in the library", and "you" is the last person, which is the last thing I expect, meaning no.
If you use negation later, it is the negation of negation, which increases the degree of affirmation, but this statement is not in line with English expression habits.