Ernst was born on April 2, 1891, in Brühl, near Cologne, the third of nine children of a middle-class Catholic family. His father Philipp Ernst was a teacher of the deaf and an amateur painter. A devout Christian and a strict disciplinarian, he inspired in his son a penchant for defying authority, while his interest in painting and sketching in nature influenced Max Ernst to take up painting himself. In 1909 Ernst enrolled in the University of Bonn, studying philosophy, art history, literature, psychology and psychiatry. He visited asylums and became fascinated with the art of the mentally ill patients; he also started painting this year, producing sketches in the garden of the Brühl castle and portraits of his sister and himself. In 1911 Ernst befriended August Macke and joined his Die Rheinischen Expressionisten group of artists, deciding to become an artist. In 1912 he visited the Sonderbund exhibition in Cologne, where works by Pablo Picasso and post-Impressionists such as Vincent van Gogh and Paul Gauguin profoundly influenced his approach to art. His own work was exhibited the same year together with that of the Das Junge Rheinland group, at Galerie Feldman in Cologne, and then in several group exhibitions in 1913.
In 1914 Ernst met Hans Arp in Cologne. The two soon became friends and their relationship lasted for fifty years. After Ernst completed his studies in the summer, his life was interrupted by World War I. Ernst was drafted and served both on the Western and the Eastern front. Such was the devastating effect of the war on the artist that in his autobiography he referred to his time in the army thus: "On the first of August 1914 Max Ernst died. He was resurrected on the eleventh of November 1918." However, for a brief period on the Western front, Ernst's position was charting maps, which allowed him to continue painting. Several German Expressionist painters died in action during the war, among them Macke and Franz Marc.
Ernst was demobilized in 1918 and returned to Cologne. He soon married art history student Luise Straus, whom he met in 1914. Next year Ernst visited Paul Klee in Munich and studied paintings by Giorgio de Chirico, which left a deep impression on him. The same year, inspired partly by de Chirico and partly by studying mail-order catalogues, teaching-aide manuals, and similar sources, he produced his first collages (notably Fiat modes, a portfolio of lithographs), a technique which would come to dominate his artistic pursuits in the years to come. Also in 1919 Ernst, social activist Johannes Theodor Baargeld, and a number of their friends and colleagues founded the Cologne Dada group. In 1919–20 Ernst and Baargeld published various short-lived magazines such as Der Strom and die schammade and organized Dada exhibitions.