Max Ernst was born in Brühl, near Cologne, the third of nine children of a middle-class Catholic family. His father Philipp was a teacher of the deaf and an amateur painter, a devout Christian and a strict disciplinarian. He inspired in Max a penchant for defying authority, while his interest in painting and sketching in nature influenced Max 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 that year, producing sketches in the garden of the Brühl castle, and portraits of his sister and himself. In 1911 Ernst befriendedAugust 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 M[ax].E[rnst]. died. He was resurrected on the eleventh of November 1918." However, for a brief period on the Western Front, Ernst was assigned to chart maps, which allowed him to continue painting. Several German Expressionistpainters 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 had met in 1914. In 1919, Ernst visited Paul Klee in Munich and studied paintings by Giorgio de Chirico, which deeply impressed 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 several colleagues founded the Cologne Dada group. In 1919–20 Ernst and Baargeld published various short-lived magazines such asDer Strom and die schammade, and organized Dada exhibitions.

Ernst and Luise's son Ulrich 'Jimmy' Ernst was born on 24 June 1920; he also became a painter. Ernst's marriage to Luise was short-lived. In 1921 he met Paul Éluard, who became a close lifelong friend. Éluard bought two of Ernst's paintings (Celebes and Oedipus Rex) and selected six collages to illustrate his poetry collection Répétitions. A year later the two collaborated on Les malheurs des immortels, and then with André Breton, whom Ernst met in 1921, on the magazineLitterature. In 1922, unable to secure the necessary papers, Ernst entered France illegally and settled into a ménage à troiswith Éluard and his wife Gala in Paris suburb Saint-Brice, leaving behind his wife and son. During his first two years in Paris Ernst took various odd jobs to make a living and continued to paint. In 1923 the Éluards moved to a new home in Eaubonne, near Paris, where Ernst painted numerous murals. The same year his works were exhibited at Salon des Indépendants.

Although apparently accepting the ménage à trois at first, Éluard eventually became more concerned about the affair. In 1924 he abruptly left, first for Monaco, and then for Saigon, Vietnam. He soon asked his wife and Max Ernst to join him; both had to sell numerous paintings to finance the trip. Ernst went to Düsseldorf and sold a large number of his works to a longtime friend, Johanna Ey, owner of gallery Das Junge Rheinland. After a brief time together in Saigon, the trio decided that Gala would remain with Paul. The Éluards returned to Eaubonne in early September, while Ernst followed them some months later, after exploring more of South-East Asia. He returned to Paris in late 1924 and soon signed a contract with Jacques Viot that allowed him to paint full-time. In 1925 Ernst established a studio at 22, rue Tourlaque.

Constantly experimenting, in 1925 Ernst invented a graphic art technique called frottage (see Surrealist techniques), which uses pencil rubbings of objects as a source of images. He also created the 'grattage' technique, in which paint is scraped across canvas to reveal the imprints of the objects placed beneath. He used this technique in his famous painting Forest and Dove (as shown at the Tate Modern).

The next year he collaborated with Joan Miró on designs for Sergei Diaghilev. With Miró's help, Ernst pioneered grattage, in which he troweled pigment from his canvases. He also explored with the technique of decalcomania, which involves pressing paint between two surfaces.

Ernst developed a fascination with birds that was prevalent in his work. His alter ego in paintings, which he called Loplop, was a bird. He suggested that this alter-ego was an extension of himself stemming from an early confusion of birds and humans. He said that one night when he was young, he woke up and found that his beloved bird had died, and a few minutes later his father announced that his sister was born. Loplop often appeared in collages of other artists' work, such as Loplop presents André Breton. Ernst drew a great deal of controversy with his 1926 painting The Virgin Chastises the infant Jesus before Three Witnesses: André Breton, Paul Éluard, and the Painter. In 1927 Ernst married Marie-Berthe Aurenche, and it is thought his relationship with her may have inspired the erotic subject matter of The Kiss and other works of that year. Ernst appeared in the 1930 film L'Âge d'Or, directed by self-identifying Surrealist Luis Buñuel. Ernst began to make sculpture in 1934, and spent time with Alberto Giacometti. In 1938, the American heiress and artistic patron Peggy Guggenheim acquired a number of Max Ernst's works, which she displayed in her new gallery in London. Ernst and Peggy Guggenheim later were married (1942–1946).

In September 1939, the outbreak of World War II caused Ernst to be interned as an "undesirable foreigner" in Camp des Milles, near Aix-en-Provence, along with fellow surrealist, Hans Bellmer, who had recently emigrated to Paris. At the time, he was living with his then lover, Leonora Carrington who, not knowing whether or not he would return, saw no option but to sell their house to repay their debts and leave for Spain. Thanks to the intercession of Paul Éluard and other friends, including the journalist Varian Fry, he was released a few weeks later. Soon after the German occupation of France, he was arrested again, this time by the Gestapo, but managed to escape and flee to America with the help of Peggy Guggenheim and Fry. Ernst and Peggy Guggenheim arrived in the United States in 1941 and were married at the end of the year. Along with other artists and friends (Marcel Duchamp and Marc Chagall) who had fled from the war and lived in New York City, Ernst helped inspire the development of Abstract expressionism.

His marriage to Guggenheim did not last, and in Beverly Hills, California in October 1946, in a double ceremony with Man Rayand Juliet P. Browner, he married Dorothea Tanning.

The couple first made their home in Sedona, Arizona, where the high desert landscapes inspired them and recalled Ernst's earlier imagery. Despite the fact that Sedona was remote and populated by less than 400 ranchers, orchard workers, merchants, and small Native American communities, their presence helped begin what would become an American artists colony. Among the monumental red rocks, Ernst built a small cottage by hand on Brewer Road, and he and Tanning hosted intellectuals and European artists such as Henri Cartier-Bresson and Yves Tanguy. Sedona proved an inspiration for the artists, and for Ernst—who compiled his book Beyond Paining and completed his sculptural masterpiece Capricorn while living there. As a result of the book and resulting publicity, Ernst began to achieve financial success. From the 1950s onwards he lived mainly in France. In 1954 he was awarded the Grand Prize for painting at the Venice Biennale. He died at the age of 84 on 1 April 1976 in Paris, and was interred at Père Lachaise Cemetery.