Origin of agleya- + gley, squint
Origin of agleya–2 + Scots gley, to squint (from Middle English glien, possibly of Scandinavian origin).
(comparative more agley, superlative most agley)
The word was popularised by Robert Burns in his 1785 Scots poems “To a Mouse”, in the much-quoted line “The best-laid schemes o’ mice an’ men / Gang aft agley”. This line is often quoted, and the word agley is occasionally used in modern English, primarily in variants of this line, such as “our plans have gone agley” or “things went agley”.