He painted his wife without lips. He painted his friend with a spinal deformity. And he painted himself as a ghost in a top hat. Paul Czannes unflinching portraits, coming to Britain this autumn, didnt just astonish Picasso and his disciples. They changed art for ever

In Paris at the dawn of the 20th century, a generation of young artists changed everything. They visited the dusty yet magical galleries of the Ethnography Museum in the rambling Trocadro and some started their own collections of African masks. This fascination with non-European art helped them break with hundreds of years of tradition. Pablo Picasso completed a portrait of his friend Gertrude Stein by giving her a mask instead of a face. He then painted Les Demoiselles dAvignon with its wildly cavorting masked prostitutes. Modern art was born in those bold years, in a glamorous atmosphere of absinthe, drugs (Picasso and his friends dabbled in opium) and sex in the red light district of Montmartre.

There is just one problem with this exhilarating story of the birth of modern art. It is not true.

My doubts began a couple of years ago in Londons National Gallery. I was looking at Paul Czannes Les Grandes Baigneuses, which he started in 1894. He was in his 50s then and did not complete it until 1905, one year before his death. Looking at the bold slashing lines of its landscape and the monumental abstracted nudes gathered under a crystalline sky, I realised something about the faces. Their eyes are dark sharp cuts. Their mouths, too. Their noses are like rigid blocks of wood. These are not faces. They are masks.

Yet they were painted by a man who, as far as anyone knows, had never looked at any African art. As for sex and drugs, he never went near them. The art of Czanne is the fruit of long, focused study by one man in front of an easel through long hot Provenal days. And this is the art that changed everything. This great 19th-century artist invented almost everything we attribute to Matisse, Picasso and Braque. Modernism is all there in paintings he executed as early as the 1880s. Czanne may be the single most revolutionary artist who ever lived.

Yet I am still banging my head against those apples. My introduction to modern art was the classic Robert Hughes TV series The Shock of the New in which Czanne is as towering as his mountain. So I couldnt wait to see Czanne Portraits, which comes to the National Portrait Gallery this October. I had to see it at its earlier stop, at the Muse dOrsay in Paris. It turns out to be the exhibition Czanne deserves and needs: a powerful, even shocking revelation of his genius.

Lets begin with masks. My suspicion that Picasso did not get them from African or Oceanian art but saw them first in the paintings of Czanne is amply confirmed by the long row of portraits of his wife, Hortense Fiquet, that line a wall, like Easter Island statues overlooking a bleak ocean. In a portrait he began in 1886, his wifes face becomes a porcelain mask. It is almost perfectly oval, unlike any human face. It is also as pale as a china cup. Weirdest of all, the lips are in the process of vanishing. Czanne erases his wifes mouth in a blank blue-tinged nothingness. For the moment lets leave any psychological interpretation of that aside. The artist looks at this face as if he were an alien, making a digital simulation of a human being.

His art dealer Ambroise Vollard looks back at him in the same alienated way. In Czannes 1899 portrait, the dealers black eyes have no human light: they are like holes in a mask. Vollards face is made of patches of colour, interacting greens, reds and yellows. Its harmony is unreal. Thin eyebrows balance above a straight nose under an immense forehead.

Once you start looking for Czannes masks, they are everywhere in portraits of children, peasants, even of himself. In about 1882 he painted his face in an eerie masterpiece that has been lent by Moscows Pushkin Museum. The bald dome of his head in this self-portrait really does look like a dome, or an egg a perfectly rounded object, out of which bright sunlight carves the simple, stark features of his face culminating in grey and white slashes of beard hair. What a strange face, he thinks, as he looks in the mirror. Who is it?

Just for one moment, scrutinising that porcelain portrait of Madame Czanne, did I wonder if he looked at non-European art for inspiration. The face almost resembles a Japanese theatre mask. Japan fascinated the French avant garde in the 19th century in Manets portrait of Czannes lifelong friend mile Zola, the radical novelist has the obligatory Japanese art in his study.

Yet, as the development of his portraiture in this superbly lucid exhibition suggests, Czanne did not need to look at works of art from Japan or anywhere else for ideas. He got his idea of the mask from looking at faces themselves, again and again, until he could see them as pure geometry.

In his portraits of his wife there is a terrible distance. When he makes her lips vanish he seems to be doing imaginary violence to her, applying the painterly equivalent of a scolds bridle. In other paintings it is clear he is idealising her turning her face into a perfect geometrical form like the egg that hangs by a thread in Piero della Francescas Renaissance masterpiece TheBrera Madonna.

Like Piero, who wrote manuscripts on mathematics, Czanne searched for geometrical order in the visual world. He famously said art should treat nature like the sphere, the cylinder and cone. But Czannes portraits are about a lot more than symmetry; they are about the unease of the human condition.

In Manets portrait of Zola, next to a Japanese print and behind Manets own Olympia, the author has pinned up a picture by the great Spanish painter of melancholic irony, Velzquez. One of Czannes first portraits in this exhibition is reminiscent of Velzquezs compassionate paintings of dwarves at the Spanish court. It is a portrait of his artist friend Achille Empraire, who was born with restricted growth and a spinal deformity. Instead of masking his physical frailty, Czanne emphasises it by sitting Empraire in an armchair with a very high back. Posing sadly, he has the clothes, beard and moustache of a romantic bohemian, yet his head massively outweighs his thin legs and emaciated hands.

This is Czannes first great painting. It dates from 18678 when he was still on a steep learning curve as an artist. Yet it transcends its technical crudeness: it is profound, speaking of the vulnerable isolation of all human beings. Enthroned like a king in his queer chair, Achille Emperaire is a tragicomic everyman. This is an unsettling and mighty image of the modern self.

Czanne and Zola were best friends at school in Aix before both becoming part of the Paris avant garde. Zola portrays his friend, sometimes cruelly, in his novels. He brought a new human rawness to fiction: there had never been anything like his stories of sex and violence. His 1867 masterpiece Thrse Raquin is still shocking in its bleak absurdism, the most relentless, unforgiving noir horror imaginable and utterly realist. Perhaps their closeness helps us to understand why, even in his first portraits, Czanne has such a terrifying eye for discomfort, neurosis, weakness.

He turned that eye most ruthlessly on himself. Czannes self-portraits are the emotional equivalent of his paintings of Mont Sainte-Victoire endlessly questing miracles of scrutiny. What is he looking for? Himself. His true identity. Why does he keep coming back to his own image in the mirror? He cant find what he was looking for. He thinks he has caught it, but it slips away. He cannot ever be sure who he is.

In a beautiful pairing by the curators, Czanne in 1885-6 portrays himself in a tall bowler hat (in French its a chapeau melon) looking from the side, as if he has just turned round and spotted himself. He looks displeased. This painting has a strong, solid, almost sculptural finish. But then he thinks again. In a second painting he has the same pose and hat but the image is dappled, incomplete, vanishing. Did he really see what he thought he saw? Hes uncertain now. Another unsettling reperception of his own image is a painting from about 1885 based on a photograph taken in 1872. Can the Czanne who is painting it even be sure he is the same man he was 13 years earlier? He seems far from convinced. One eye in the portrait is almost closed. The figure is isolated in ghostly blue. Who was I, then?

Czanne not only anticipates Picasso but also Proust and Joyce as he meditates on the nature of the self. We are not continuous beings, his portraits suggest. We are mysteries to ourselves and others, divided and fragmentary behind our masks. He is the true inventor both of modern art and the modern soul.

Czanne Portraits is at Muse dOrsay, Paris, until 24 September and at the National Portrait Gallery, London WC2H, from 26 October until 11 February.