The quote itself is from the 2006 computer-animated film Flushed Away.
During one scene of the movie, the character Toad (voiced by Sir Ian McKellen) cries “Huzzah! A man of quality!”, and points in the direction of the viewer.
In 2014, the clip that features Toad saying “Huzzah! A man of quality!” was uploaded on YouTube.
Later, in 2017, Imgur user dankmemesnsteelbeams uploaded a looped version of the video with the caption saying “MRW I meet a man of quality who shares my love of antiquated exclamations.”
Users on Reddit also started using the format later that year, mostly for situations where people are genuinely surprised of one another’s knowledge on the person’s beloved topic or sub-culture.