Leyden was originally intended for the clerical profession, but abandoned it for more secular employments. His spirit was intense, restless and ambitious, and he longed for foreign travel and literary distinction. After spending five years at college, he became tutor to a highly respectable family, with whose sons he repaired to the University of St. Andrews, where he pursued his Oriental studies, and in 1799 published a History of African Discoveries. He was the author, also, of various translations and poems, which attracted considerable attention and introduced him to the best society. In 1800 he was ordained as a minister, and his discourses were highly popular; but he was dissatisfied with them, and felt that he was called to a different sphere. He continued to write and compose, contributed to Lewis's "Tales of Wonder," and Scott's "Border Minstrelsy." He was an enthusiastic admirer of the old ballads, and on one occasion actually walked between forty and fifty miles for the sole purpose of visiting an old person who possessed an ancient historical ballad. He edited the "Scot's Magazine," for a year, and published "The Complaynt of Scotland," an old work written about 1548, which he accompanied with a learned dissertation, notes and a glossary. His strong desire to visit foreign lands induced his friends to procure for him an appointment in India, where he might study the oriental languages and literature. The only situation which they found available was that of assistant surgeon, for which it was necessary to have a medical diploma. But such was the energy, decision and perseverance of Leyden's character, that he qualified himself in six months; and not long after set out for Madras. Before taking his departure he finished his "Scenes of Infancy," as it were, the last token of his love for Scotland, which he never again beheld. He was resolved to distinguish himself or die in the attempt. Indeed a premonition of such an issue seems to have haunted his mind, and was expressed, with touching beauty, in his "Scenes of Infancy."

"The silver moon at midnight cold and still,
Looks sad and silent o'er yon western hill;
While large and pale the ghostly structures grow,
Reared on the confines of the world below.
Is that dull sound the hum of Teviot's stream?
Is that blue light the moon's or tomb-fire's gleam?
By which a mouldering pile is faintly seen,
The old deserted church of Hazeldean,
Where slept my fathers in their natal clay,
Till Teviot's waters rolled their bones away?
Their feeble voices from their stream they raise—
'Rash youth! unmindful of thy early days,
Why didst thou quit the simple peasant's lot?
Why didst thou leave the peasant's turf-built cot,
The ancient graves where all thy fathers lie,
And Teviot's stream that long has murmur'd by?
And we, when death so long has clos'd our eyes,
How wilt thou bid us from the dust arise,
And bear our mouldering bones across the main.
From vales that knew our lives devoid of stain?
Rash youth! beware, thy home-bred virtues save,
And sweetly sleep in thy paternal grave.'"

After his arrival in Madras, his health became impaired, and he removed to Prince of Wales Island. He resided there some time, visiting the neighboring countries, and amassing curious information on the literature and history of the Indo-Chinese, which he embodied in an elaborate dissertation read before the Asiatic Society at Calcutta. Quitting Prince of Wales Island, Leyden was appointed a professor in the Bengal College, which he soon exchanged for the office of judge, a more lucrative employment. His spare time was devoted to the prosecution of his oriental studies. "I may die in the attempt," he wrote to a friend, "but if I die without surpassing Sir William Jones a hundredfold in oriental learning, let never a tear for me profane the eye of a borderer." In 1811 he accompanied the governor general to Java. His spirit of bold adventure led him literally to rush upon death. He threw himself into the surf in order to be the first Briton who should set foot upon Java. When the invaders had taken possession of Batavia, the same reckless eagerness took him into a cold damp library, in which were many books and manuscripts. Affected perhaps by the disease of the climate he had a fit of shivering on leaving the library, and declared that the atmosphere was enough to give any one a mortal fever. In three days after he died, August 28, 1811, on the eve of the battle which secured Java to the British Empire.

Leyden's Poetical Remains were published in 1819, with a memoir. In addition to the "Scenes of Infancy," it contains some vigorous ballads. To one of these, "The Mermaid," as well as to the untimely death of its author, Sir Walter Scott has referred in his "Lord of the Isles."

"Scarba's Isle, whose tortured shore
Still rings to Corrievreckin's roar,
And lovely Colonsay;
Scenes sung by him who sings no more:
His bright and brief career is o'er,
And mute his tuneful strains;
Quenched is his lamp of varied lore,
That loved the light of song to pour:
A distant and a deadly shore
Has Leyden's cold remains."

His "Scenes of Infancy" is distinguished for the sweetness of its versification, and its pleasant pictures of the vale of Teviot. In strength and enthusiasm, it is much inferior to his ballads. The opening of "The Mermaid," has been praised by Sir Walter Scott "as exhibiting a power of numbers, which for mere melody of sound has rarely been excelled."

On Jura's heath how sweetly swell
The murmurs of the mountain bee!
How softly, mourns the writh'd shell,
Of Jura's shore, its parent sea.

But softer, floating o'er the deep,
The mermaid's sweet, sea-soothing lay,
That charmed the dancing waves to sleep,
Before the bark of Colonsay.

But better known, and far more affecting, is Leyden's "Ode to an Indian Gold Coin," written in Cherical, Malabar, which in addition to its vigor and beauty, has a fine moral which it is not necessary to point out.

Slave of the dark and dirty mine!
What vanity has brought thee here?
How can I love to see thee shine
So bright, whom I have bought so dear?
The tent-ropes flapping lone I hear,
For twilight converse arm in arm;
The jackal's shriek bursts on my ear,
When mirth and music wont to cheer.