Among the surreal visual phenomena that emerged during the coronavirus lockdowns were images of abandoned cities: Venice without its selfie stick-wielding masses, train stations devoid of frenzied commuters, Europe’s historic squares looming with a silent unease. Vacant public spaces have become emblems of the pandemic, bound to the sense of uncertainty it has wrought. However, a century before these eerie snapshots circulated the internet, this tense mood was captured by one painter who wielded the visual impact of emptiness with great precision, drawing out its magical and suspenseful qualities to mesmerising effect.

With their deserted piazzas, long shadows and endless arcades, the haunting compositions of Giorgio de Chirico’s early paintings bear an uncanny resemblance to our recent reality. Their arresting nature derives from their quiet complexity; through a calculated configuration of clean lines and exaggerated perspectives, de Chirico conjures an oneiric world, one where absence possesses a hypnotic power.

In these sparse stages, surfaces radiate with meaning and nothing is as it seems. They represent some of the most famous examples of de Chirico’s pittura metafisica, or metaphysical painting, which sought to discover a hidden symbolism in everyday surroundings. That de Chirico developed this enigmatic style in a period (1909-19) that coincided with the concurrent convulsions of war and pandemic makes these works all the more hair-raising. As the focus of an exhibition at the Hamburger Kunsthalle, they offer a direct line between the turmoil of the artist’s day and our troubled present.

De Chirico was born in 1888 to Italian parents in Volos, Greece, where his father worked as an engineer for the Thessaly railways. After studying art in Athens and Munich, he headed for Paris in 1911, alighting in Florence and Turin along the way. These Italian cities left a profound impression. Turin in particular, with its striking Neoclassical architecture, would become a model for the geometrical cityscapes in a body of work known as the “Italian Piazzas”, studies of solitude in which the artist set out to uncover what he described as “the metaphysical aspect of architecture and Italian cities”.

“The Joys of the Poet” (1912) presents a dreamlike vista: a teal sky fading into dark green contrasted against a brown piazza flooded with late-afternoon sun, a burbling fountain, a solitary figure in the distance, a passing train in the background. A vast solemnity pervades. It is Italy, but simplified and rendered temporally ambiguous so the impression is that of seeing an unfamiliar place we simultaneously seem to recognise. This imaginary setting becomes a place for memory and myth to convene. Another train, possibly a reference to his father, glides silently across the background of a nameless town in “The Soothsayer’s Recompense” (1913), while a reclining statue of Ariadne basks in a dramatically shaded square. By weaving together classical and personal histories, de Chirico projects a reality full of auspices; his is a world of concealed signs, of Delphic riddles and half-lit truths.

Nietzsche’s influence can be felt in the psychologically intense and portentous mood of these paintings. Writing in his autobiography in 1945, de Chirico recalls how he was struck by a “strange and profound poetry, infinitely mysterious and solitary” in the German philosopher’s works. He recognised this inscrutable atmosphere in the architecture of Turin, which reached its apex during “an autumn afternoon, when the sky is clear and the shadows are longer than in summer, for the sun is beginning to be lower”. Such fleeting moments, he believed, could provoke sudden revelations. The expectant energy of these paintings conveys the notion that the spaces of a city — a square, a street, a fountain, a train station — could become arenas for deep emotional experience.

Perspective was key to this aim. While other members of the Parisian avant-garde were embracing the flatness of the canvas, de Chirico emulated his quattrocento forebears by reviving an interest in perspective, probing its emotive and poetic possibilities. It heightens the apprehensive air of “The Frightening Morning”, painted after the artist had been ordered to report for military service in Turin in March 1912; a monotonous arcade flanks the left side of the painting, empty arches receding ominously into the distance. In the foreground, the black shape of a locomotive blocks our view into a featureless street — after de Chirico’s application for exemption was rejected, he fled back to Paris by train.

It also drives the feeling of immensity in “The Nostalgia of the Infinite” (1911-13) in the dizzying scale of a tower dwarfing two small figures below. In “The Serenity of the Scholar” (1914), a steep red surface, impossible to climb, slopes upwards towards an invisible platform where we can just catch a glimpse of another train. This disorientating play of obstruction and expansiveness carefully maintains the balance between the known and the unknown that makes these paintings so unsettling. Our contemporary experience, dominated by curfews and the controlled flow of bodies, only adds to their mournful tenor.

When war broke out in Europe, de Chirico enlisted in the Italian army in 1915 and was stationed in Ferrara. Here he began to turn away from themes of infinity and sought comfort in ordinary objects. In his work of the time, the melancholy and mythology of the squares disappear. Instead, an affinity for enclosed spaces emerges along with mathematical compositions that seem to privilege order over ambiguity: the angular network of picture frames in “The Engineer’s Longing”, the cluttered room in “Metaphysical Interior with Large Factory”, both from 1916, signal a retreat into the safety of the interior world.

Eventually wartime fatigue, a bout of Spanish flu, and the death of his friend Apollinaire would force de Chirico back into the realm of the spiritual and chimerical. Executed in the winter of 1918, “The Sacred Fish” depicts two smoked herrings, shimmering with detail, lying on a comparatively flat trapeze platform with a glowering sky in the horizon. The divine allegory rendered in such vivid realism jars with its unreal context — was the artist searching for beauty in a fractured Europe? Perhaps, but it seems he found little solace in this rupture. This metaphysical work would be one of his last.

In November 1919, de Chirico published an article in an Italian magazine entitled “The Return of Craftsmanship”, in which he advocated a reprise of traditional techniques, marking the end of his distinctive modernism. A new, critically shunned period of classical realism ensued, in tune with a growing movement in artistic circles that, in the wake of senseless destruction, called for “a return to order”.

We might crave a similar return today. But the Hamburger Kunsthalle makes much of the irony that only now can we fully appreciate the feeling of estrangement unique to cities distilled in de Chirico’s metaphysical works. By inviting the public to send in pictures of lonely lockdown scenes to be displayed in the museum’s foyer, the exhibition foregrounds the vital message of the painter whose work would become a foundational inspiration for Surrealism: the margin between the real and the unreal is thinner than we think.

Hamburger Kunsthalle is due to reopen on May 8,

Follow on Twitter to find out about our latest stories first