I came across the interesting word agley today when looking up something else in a Chinese dictionary – the Chinese equivalent is 错 [錯] (cuò). It is a Scots word, pronounced [əˈgli/əˈgləi], that means “off the straight, awry, oblique, wrong”. It comes from the word gley (to squint), according to Wiktionary, which is possible related to the Icelandic word gljá (to glitter) [source].
It appears in the Robert Burns poem “To a Mouse”:
The best-laid schemes o’ mice an’ men
Gang aft agley,
An’ lea’e us nought but grief an’ pain,
For promis’d joy!
This poem was the only place I’d heard it before, so it was quite a surprise to come across it in a Chinese-English dictionary. Have you heard or seen it used elsewhere?