When Sybille Bedford set out for Mexico immediately after the second world war, she was hoping to satisfy "a great longing … to be in a country with a long nasty history in the past and as little present history as possible". She would not be disappointed. As "the oldest country in the New World", Mexico seemed to have achieved the impossible feat of being both locked in history and innocent of it. As Bedford was to write of her host, "Don Otavio has seen so many changes that he has failed to notice them."

Don Otavio's failure to apprehend change was not simply the insouciance of a sequestered aristocrat, though he was certainly that. Rather, it was broadly symptomatic of the Mexican experience of a revolution that had started in 1910 and, more than three decades later, couldn't stop revolving. The revolution's inability to complete itself meant that it remained strangely ahistorical: the attenuated present was always too wobbly, too contingent, to be patterned into the coherent narrative that the sweep of history demands.

And so it was that Mexico's fascination with its "long nasty history" acquired, in this revolutionary period, a pathological dimension. There was much to be fascinated by, a theatre of cruelty featuring mass human sacrifice and slave labour in the pre-Columbian age, the barbaric subjugation of the indigenous people by the Spanish conquistadores, the war of independence, war with America, military occupation by France, the feudal dictatorship of Porfirio Díaz, and, between acts, too many skirmishes and insurgencies to be counted.

The revolution itself, though it succeeded in seeing off Díaz and his Belle Epoque window-dressing, had no philosophical or ideological underpinning, and no centre. It was a mass agrarian movement, a peasants' revolt that erupted, like Mexico's famous volcanoes, sporadically and unpredictably, with a few charismatic regional characters – Pancho Villa, Emiliano Zapata – providing the greatest spectacle (Pancho Villa having first negotiated with the Mutual Film Corporation for the cinematic rights to his battles, which he agreed to fight in daylight for technical reasons).

Protracted, bloody, diffuse, the revolution's exorbitant toll on the human spirit was audited by the Mexican writer Mariano Azuela in a searing novel, Los de Abajo (The Underdogs), written in 1916. The protagonists, a small group of revolutionary soldiers whose optimism has curdled as the conflict engulfs them, lose all sense of what they had set out to achieve. They descend into betrayal, murder, rape, drinking and gambling, terrorising the local population who had welcomed them as freedom fighters. They do not overturn the oppressors, they become them.

A river runs through it … a detail of Diego Rivera's mural The Great City of Tenochtitlan, in Mexico City. Photograph: Dea/G.Dagli Orti/De Agostini/Getty Images

Confusing enough for its participants, the revolution was mystifying to outsiders. When the Soviet poet and radical futurist Vladimir Mayakovsky arrived in the country in late 1924, his hope of witnessing an uprising that could be conjoined to international Marxism was immediately dashed by the realisation that this was a decidedly local affair. Moreover, it had failed to deliver, even locally. In Mexico City, having toured the "historical" houses of the "priests and the rich", he asked to see where the poor lived. There he found filth, overcrowding, and the descendants of the "magnificent Aztecs" slumped in the pulquerias, indentured to cheap alcohol ("Heroism is not for now," he wrote. "Moctezuma has become a beer brand").

Violence was endemic. Every man between the age of 15 and 70 carried a gun – even Diego Rivera's little daughter was put down for her afternoon nap with a Colt revolver placed next to her. Mayakovsky quickly understood that the Mexican "revolutionary" was not, as in the Soviet Union, an individual with an ideology and a programme, but a person who overthrows authority with a weapon in his hand: "And, since in Mexico everybody either held power, or holds power, or wants to hold power, they are all revolutionaries."

As Adrian Locke points out in Mexico: A Revolution in Art, 1910-1940 (which accompanies the Royal Academy's exhibition of the same title), remarkably few artists depicted scenes of the Mexican revolution. Which is not to say there was no revolutionary art. Rather, an extraordinarily rich and original visual culture emerged, a Mexican modernism that was as distinct as the energy it drew on: carnivalesque, savage, folkloristic, macabre. Above all, it was independent, rejecting external influences and turning inward to retrieve something from the chaos.

The dominant figures of this new art were "Los tres grandes", The Big Three – Rivera, David Alfaro Siqueiros and José Clemente Orozco – whose murals played a key role in building a national identity, a project that had hitherto stalled in the hands of the politicos. In a country with 90 per cent illiteracy, the task was to develop a visual language that could coax public feeling into public opinion. The muralists took the highly visible remnants of the past – the complex wall paintings and lapidary motifs of the pre-Columbian period, and the Catholic imagery of the colonisers – and reworked them into storyboards for a new consciousness. Where the Soviet Union had a commissar of enlightenment, Mexico had now found its great explainers. Of Rivera's Creation at the secretariat of public education, Mayakovsky reported ecstatically that he had seen "the world's first Communist frescoes".

There was nothing that could properly be called a movement, but the muralists shared a respect for popular figurative art (what Rivera called "the native talent for plastic expression") and embedded its practical, decorative and ritual vocabulary in their work. This was a political as well as an aesthetic choice intended to encourage the inclusion of Mexico's indigenous population – the underdogs of Spanish conquest – into post-revolutionary society. DH Lawrence judged it a failure, complaining that Rivera's "flat Indians" were exploited as mere "symbols of the weary script of socialism". Others (mostly foreigners) were irritated by the over-emphasis of "painted oratory", and could not accommodate the murals' iterative function, their horror vacui, or fear of empty spaces.

It was Rivera, of course, who attracted the most attention, retarding the acknowledgement due to Siqueiros and Orozco. His huge frame housed an inexhaustible supply of stamina – for work, sex and political arguments ignited by tequila – and a compulsion to make things up. He lived his fantasies to the point of self-actualisation, painting himself into his historical pageants as an architect, scientist, revolutionary hero (at the Palazzo Cortés in Cuernavaca he becomes the great southern leader José María Morelos). Egocentric, certainly, but perhaps Rivera was using his own very corporeal self to support the construction of a body politic, to incorporate the new Mexico.

Means of production … a detail of Diego Rivera's Detroit Industry Fresco Cycle (1932-33) at the Detroit Institute of Arts. Photograph: Apic/Getty Images

Murals are not just public art but public property, hence their intrinsic revolutionary value – they belong to everybody. They are designed to be moving, but can't be moved, so to see them you have to go to Mexico (and they're worth it). Their absence from the Royal Academy exhibition is no demerit, however, but an opportunity to survey a less obviously rhetorical vein of Mexican modernism.

Where Rivera used a deliberately overblown technique to cover huge surfaces, his wife Frida Kahlo made small paintings that were intensely expressive of the private self. After suffering horrific injuries in a tram accident when she was a student, she lived with permanent pain, her body held together with casts, surgical corsets, braces, pulleys and levers. Her experience of her body was confessed on canvas with terrible intimacy, at once lucid and hallucinatory. But to describe her work as personal is insufficient. It embodied the trauma and mutilation suffered by the country at large, and traced the pathology of that "long nasty history" from which Mexico was struggling to recover.

Kahlo's place in the feminist canon is secured, but she is still undervalued in the history of modernism. She was just as progressive as her husband, often more inventively so. At a time when Mexican society dressed like Europeans, her extravagantly ethnic costumes and jewellery were viewed as eccentric ("Where's the circus?" children would ask her in the street). For Kahlo, it was a political intervention, an aesthetic strategy aimed at rescuing an indigenous people and a culture that had been abandoned. Any view of this culture as "other", as mysterious or "curious" – as implied by André Breton's remark that Mexico was "the Surrealist place par excellence" – she passionately rejected.

Mexican artists did not embrace surrealism in significant numbers, for which Breton never forgave them (or the country, for the assassination of Trotsky in August 1940). It was not a case of hostility towards outsiders – the revolutionaries were nationalistic, not xenophobic, and the many foreign artists and intellectuals who were drawn to the country's dramas were warmly welcomed, among them Tina Modotti, Josef and Anni Albers, Antonin Artaud, Edward Burra, Sergei Eisenstein, Henri Cartier-Bresson, Robert Capa. But the cause was to distil a Mexican reality, for Mexico, and not some hybrid international style.

As the revolution ground on, presidents were challenged by counter-presidents, governments fell and new ones were installed, ensconcing what Mayakovsky called the "pseudo-revolutionaries", whose methods rendered their ideals quite immaterial. Public commissions for artists were either prodigal or non-existent. When the muralists accepted contracts from Roosevelt's New Deal arts programme, their work was often under siege at home.

In the US, they stimulated a national school whose work is still described by Americans – and routinely disparaged – as "socialistic". Jackson Pollock worked in the mural division of the Works Progress Administration, believing, like Siqueiros, that the easel picture was "a dying form, and the tendency of modern feeling towards the wall picture or mural". He was a great admirer of Orozco, who lived in the US from 1927 to 1934, and whose stylistic influence is powerfully evident in Pollock's aggressive, dark brushstrokes of that period.

In 1936, Pollock joined the Siqueiros Experimental Workshop in New York, where he was encouraged to use industrial paints and the commercial lacquers used to spray cars (you don't use a wooden brush in the age of steel, Siqueiros insisted). A member of the workshop later recalled that they applied this fast-drying paint "in thin glazes or built it up into thick globs. We poured it, dripped it, splattered it, and hurled it at the picture surface". Described by Siqueiros as a "controlled accident", this was the technical and imaginative breakthrough that produced abstract expressionism, of which Pollock – "Jack the Dripper" – was the poster boy. As it turned out, Mexican modernism was much more than just a local affair.