While Hayagriva is usually considered an avatar of Vishnu, in some traditions, he is also considered an avatar of Brahma. This is because Hayagriva is closely associated with knowledge and wisdom, and Brahma is the god of creation and knowledge.
However, the more prominent and widely accepted belief is that Hayagriva is an avatar of Vishnu.