Born in 1853 to a carpenter in Bern, Hodler apprenticed in Thun under his stepfather, the decorative painter Gottlieb Schüpbach (1814–1873), and then with Ferdinand Sommer (1822–1901), a specialist in picturesque Alpine views, before departing in 1871 for Geneva, the artistic center of Switzerland. Between 1872 and 1877 he trained with the landscapist Barthélemy Menn (1815–1893) and studied the work of Dürer and Courbet. By the early 1880s Hodler had developed a robust Realist style, but around this time he began to frequent Symbolist circles, which brought him into closer contact with the Paris art world, most notably the paintings of Puvis de Chavannes. While retaining aspects of his earlier naturalism, Hodler was increasingly fascinated by allegory and abstract ideals. The Dream of the Shepherd belongs to the ambitious Symbolist compositions that established his reputation in Europe at the turn of the twentieth century, on a par with Edvard Munch and Gustav Klimt. In these works, Hodler explored such universal and psychologically fraught themes as sleep, dreams, death, and love, often with erotic overtones.
Sources from the first half of the twentieth century tend to date The Dream of the Shepherd to 1893 (see, e.g., Loosli 1922). More recently, the painting has been dated to 1896, the year it was first shown at the Swiss national exhibition in Geneva (Fischer 2009). Hodler was a considerable presence at the exhibition: he worked on the painted decoration for the Palais des Beaux-Arts; showed five pictures in the main venue; and contributed The Dream of the Shepherd and another oil, Towards the Ideal (unlocated) to the Exposition Fantaisiste, held in the Théâtre du Sapajou, a theater on the grounds of the national exhibition used for light entertainment. The two "decorative panels," as they were described in the catalogue, flanked the entrance to the theater (photo SIK-ISEA, Schweizersches Kunstarchiv, permanent loan, Musée d’art et d’histoire, Neuchâtel; see Images).
In Towards the Ideal, Hodler reprised the seminude, sleeping couple in the lower right corner of his controversial painting The Night (1889–90, now Kunstmuseum Bern), switching the figures to a vertical orientation so that they appear to float in space. The Dream of the Shepherd similarly conjures an otherworldly realm, suffused with strains of erotic desire. The canvas is divided into two zones: in the lower, terrestrial zone, a young shepherd—a popular character in Swiss folklore—kneels amid a rocky landscape dotted with small red flowers (Paul Müller in Christie's, Zürich, sale cat., December 11, 2013, p. 39, under no. 40). He buries his head in his left hand, which covers his entire face, while with his right arm he holds a long shepherd’s staff. His flock is nowhere in sight. The life-size figure, painted from a local model, relates to Hodler’s earlier, realistic depictions of peasants, warriors, and beggars, but displays a new psychological intensity; the deeply expressive and powerful pose is highly reminiscent of the damned souls in Michelangelo’s fresco of the Last Judgment in the Sistine Chapel in Rome.
In the upper zone of the canvas, above the horizon of the distant hill, appear what Hodler described in a sketchbook as "white women on a white sky, which is crossed horizontally by blue clouds" (ca. 1895, Cabinet d’arts graphiques du Musée d’art et d’histoire, Geneva, carnet inv. 1958-176/32.06; see Images). The stylized gestures of the eight naked women evoke the nascent modern dance movement, while the decorative, frieze-like arrangement of the figures recalls the work of Puvis de Chavannes, which was much admired by Hodler. The women’s pale, ethereal forms mark them as apparitions, in stark contrast to the shepherd’s muscular body, rendered with naturalistic detail.
There are several studies for the composition. One sketch appears to show the shepherd accompanied by additional figures, with the frieze of women overhead (ca. 1895, Cabinet d’arts graphiques du Musée d’art et d’histoire, Geneva; carnet inv. 1958-176/116.11; see also 1958-176/116.17; in Images). Two others depict the shepherd beneath a sun, which takes the form of a female head surrounded by a halo of rays (ca. 1895, Cabinet d’arts graphiques du Musée d’art et d’histoire, Geneva; carnet inv.1958-176/10.12; 1958-176/116.08; see also 1958-176/116.07; in Images). These last drawings link The Dream of the Shepherd with Hodler’s attempts to express mankind’s striving toward light and enlightenment, as in works such as The Day (1899, Kunstmuseum Bern), which presents hieratically posed female nudes as symbols of radiance and harmony with nature. The women in The Dream of the Shepherd have been similarly interpreted as embodiments of light and as conduits for divine illumination (Müller in Christie's, Zürich, sale cat., December 11, 2013, p. 39, under no. 40).
Critics at the Sapajou exhibition of 1896 suspected that Hodler’s painting was not entirely in earnest. One writer wondered whether the artist was engaged in "mysticism or mystification," adding, "You have the right to be uncertain, you’re at the Sapajou" (Serment 1896; see also Vallette 1896). As this remark indicates, the doubt about Hodler’s intentions stemmed partly from his choice of venue. The Théâtre du Sapajou derived its name from a satirical journal, and the catalogue for the Exposition Fantaisiste, decorated with sketches of monkeys and a dog in fancy dress, conveys a lightly mocking tone. It has been argued that The Dream of the Shepherd and Towards the Ideal were meant as a rejoinder to the conservative attitudes that had blocked the display of The Night at the Musée Rath in Geneva in 1891 and again at the national exhibition in 1896 (Fischer 2009). The painting, with its realistically depicted, undressed men and women in suggestive postures, was deemed provocative and immoral, earning Hodler considerable notoriety.
 All images from Hodler's sketchbooks © Musée d’art et d’histoire, Ville de Genève