Most people who've heard of William Hayley have done so because of his connection with William Blake.
It was Hayley who persuaded Blake to quit London for Felpham in Sussex in 1800 in order to illustrate Hayley's life of Cowper. Blake visited and found a cottage to rent in July, and he and his wife Catherine made the move in September.
At first the two Williams were delighted with each other. Blake wrote:
Away to sweet Felpham, for heaven is there:
The ladder of Angels descends through the air,
On the turret its spiral does softly descend,
Through the village it winds, at my cot it does end.
The bread of sweet thought and the wine of delight
Feed the village of Felpham by day and by night;
And at his own door the bless'd Hermit does stand,
Dispensing, unceasing to all the wide land.
Blake didn't think of Hayley as "the bless'd Hermit" for long and the relationship between the two men deteriorated over the three years Blake lived in Sussex. It's not surprising: the two men were fundamentally incompatible; Blake's fiery visions were beyond the ken of his well-meaning but interfering employer, who was at the time, in the throes of grief following the deaths of both his best friend Cowper and his son, Thomas Alphonso (of whom, more later).
It's easy to imagine what drove Blake to write his notorious epigrams on Hayley (it's also easy to imagine him carving the letters into the page in frustration):
Of Hayley’s Birth
Of Hayley’s birth this was the happy lot:
His mother on his father him begot.
To forgive enemies Hayley does pretend,
Who never in his life forgave a friend,
And when he could not act upon my wife
Hired a villain to bereave my life.
Thy friendship oft has made my heart to ache:
Do be my enemy—for friendship’s sake.
On Hayley’s Friendship
When Hayley finds out what you cannot do,
That is the very thing he’ll set you to;
If you break not your neck, ‘tis not his fault;
But pecks of poison are not pecks of salt.
On Hayley the Pickthank
I write the rascal thanks, till he and I
With thanks amd compliments are quite drawn dry.
But when it really mattered, William Hayley was there for Blake. When Blake was tried for sedition (the death penalty applied in the event of conviction), William Hayley organised and funded his defence. And Blake felt some remorse about some of the things he'd written about Hayley "Burn," he instructed his foremost patron, Thomas Butts, "what I have peevishly written about about any friend."
Hayley continued to commission occasional work from Blake for a few years after Blake returned to London but, within a few years, their correspondence petered out.
For a more complete (& slightly whimsical) exploration of the relationship between the two men, see www.rolledbythewind.net - a thing I made for if:book UK's Songs of Imagination & Digitisation a few years back.