The Avatar of Lord Vishnu as Hayagreeva was to restore the Holy Vedas to Brahma.
Brahma had become extremely proud of his status as Creator and Lord Vishnu intending to subdue his (Brahma's) pride, let out a couple of water droplets from his Lotus seat from which arose two demons (Asuras) Madhu and Kaitabha who stole the Holy Vedas from Brahma.
Brahma sought the help of Lord Vishnu to retrieve the Holy Vedas.
Lord Sri Maha Vishnu incarnated as Hayagreeva, appeared with face of a white Horse, destroyed the Asuras and restored the Vedas to Lord Brahma.
Lord Hayagreeva blesses, devotees with memory power and supreme wisdom.
Sri Vedaanta Deshika, a Vaishnava Aachaarya has written many verses on Lord Hayagriva.
OM SRI HAYAGRIVAYA NAMAH