In early 1623 the Prince of Wales travelled incognito to Madrid to woo the Spanish infanta, Maria Anna, sister of Philip IV. The aim of the amorous jaunt was to ease the fractious relations between Catholic Spain and Protestant England and bring peace to a Europe wracked by the Thirty Years War. The 22-year-old prince, two years away from being crowned Charles I, was an unprepossessing figure – short of stature and with bandy legs caused by childhood rickets. He nevertheless fancied himself as a character from chivalric romance and decided to speed up the flagging marriage negotiations by his personal intervention.

Charles’s plan quickly foundered: his arrival with a small group of friends, most notably George Villiers, Duke of Buckingham – James I’s rumoured lover and a figure at the centre of salacious court gossip – embarrassed his hosts; the infanta thought Charles an infidel; Buckingham bickered with the Spanish chief minister; discussions halted, and eight months later the chastened prince was back in London, brideless.

He did not, however, return empty-handed. In his baggage were, among other items, four paintings by Titian, one each by Veronese and Correggio, a sculpture by Giambologna and possibly a now-lost portrait of the prince by Velázquez. Just as important as the works themselves was Charles’s new understanding of monarchical pomp. What the Habsburg misadventure had taught him was that a prestigious art collection was a prerequisite of dynastic power and display. It was a potent lesson since the Stuarts were relative newcomers, having occupied the English throne for only 20 years. Charles was a natural aesthete but he had also learned that art equalled authority.

So well did he learn that Rubens would later call him “the greatest amateur [lover] of paintings among the princes of the world” and by the time of his execution in 1649 Charles’s collection numbered some 1,500 paintings as well as 500 statues and innumerable tapestries. Within months of his death, Cromwell’s commissioners dispersed the holdings, by sale, gift or to settle debts (humorously, the palace plumber was given Jacopo Bassano’s painting of The Flood in lieu of payment), raising more than £184,000 for the Commonwealth’s coffers but destroying one of history’s greatest art collections.

With the Restoration, Charles II set about piecing the collection back together and indeed managed – through purchases, gifts and coercion – to retrieve a large chunk of it. The recouped works remain the core of the current Royal Collection but numerous masterpieces were never recovered, adding immeasurably to the riches of the Louvre and the Prado instead. Now some 150 works have been gathered at the Royal Academy in London for “Charles I: King and Collector”. It is the first time in nearly 370 years that, for example, Titian’s portrait of Charles V with a Dog (Prado) and his Supper at Emmaus (Louvre) will have hung alongside Pieter Bruegel the Elder’s Three Soldiers (Frick) and Velázquez’s Philip IV (Dallas).

Charles’s collecting habits were prefigured by his older brother, Henry, who had shown the makings of a connoisseur before his death at 18; indeed he so delighted in 15 small bronzes by Giambologna that Charles put one statue of a horse in his hands to comfort him as he lay dying. Charles, though, fulfilled his brother’s promise. His taste, as was common for a modern prince, was for the Italian Renaissance in particular and in his case post-1500 art. He was led in his predilections by Buckingham and the Earl of Arundel, both well-travelled collectors at a time when excursions into Catholic Europe were relatively rare. Arundel and his wife, Aletheia Talbot, brought back paintings and on one occasion a gondola from Venice, which, as a contemporary drily noted, “will not so well brook our river [Thames]”.

Charles’s method seems to have been to buy contemporary works himself and trust his agents, such as the musician and courtier Nicholas Lanier, to acquire the best 16th-century artists on his behalf, sight unseen. Although he was not systematic, he earmarked the rarest of the High Renaissance greats – Leonardo, Michelangelo and Raphael – as necessities. In 1632 he purchased the Sleeping Cupid, a sculpture carved in Florence by the 20-year-old Michelangelo, who had treated it with acid and earth to age it, to fool the buyer into thinking it was a Roman original and so increase its value. The work, which made Michelangelo’s reputation, has disappeared; according to some, it was destroyed in the fire that gutted Whitehall Palace in 1698, according to others it remains awaiting discovery.

Charles’s Raphaels included a St George and the Dragon, a Virgin and Child with St Anne and John the Baptist (La Perla) – so called because when Philip IV acquired it on Charles’s death he called it “the pearl” of his collection – and, most spectacularly, seven of his huge Acts of the Apostles cartoons commissioned by Pope Leo X for tapestries to decorate the Sistine Chapel. Charles did not buy them as works of art but as designs for use at the Mortlake tapestry manufactory, established by his father. The cartoons, now in the Victoria and Albert Museum, were cut into strips for ease of use by the weavers and the resulting hangings cost many times more than any painting in his collection, reflecting contemporary tastes that put tapestries, heavy with gold and silver thread, as the most expensive of all luxury goods. In 1625, meanwhile, Charles swapped a Titian Holy Family and Holbein’s Portrait of Erasmus for Louis XIII’s John the Baptist by Leonardo – a painting that returned to France with Charles’s execution and remains in the Louvre today.

The great coup of Charles’s collecting career, however, was the purchase of the bulk of the fabled Gonzaga collection from Mantua in 1627-32. The negotiations were carried out with three successive cash-strapped dukes of Mantua by Charles’s agent, a Flemish merchant-dealer called Daniel Nijs. The last of the three dukes, Vincenzo, was the most amenable because he needed the money to acquire the personal services of a celebrated female dwarf. The fact that the most important of the Mantuan pictures, Mantegna’s nine huge canvases showing The Triumph of Caesar, were a late addition to Nijs’s haul suggests that one of the greatest works of art in England (they hang at Hampton Court) owes its presence to the itch of an unusual sexual peccadillo.

The Gonzaga pictures transformed the Royal Collection at a stroke: more than 130 Mantuan paintings as well as 90 Classical statues and 190 busts that had taken two centuries to put together arrived in England in three tranches. The quality was phenomenal; what Charles gained for his money (although he was an extremely reluctant payer) were works by, among others, Correggio (at that time seen as Raphael’s equal), Caravaggio, Andrea del Sarto, Veronese, Guido Reni, Giulio Romano, Pieter Bruegel as well as Raphael and Mantegna. Paintings by Titian and Tintoretto were among those that had to be patched up when they were damaged by a consignment of mercury that had spilled on to them in the ship’s hold during the voyage back from Italy.

Although the purchase was seen by most as a coup, not everyone welcomed the works’ arrival: the more puritan elements saw them as dangerously Catholic and idolatrous; “robustrous boistrous druncken-headed imaginary gods”, in the words of Balthasar Gerbier. Gifts of foreign art, said the pamphleteer William Prynne, were an attempt to “seduce the king himself with Pictures, Antiquities, Images and other vanities”.

Charles, though, did not just import art but artists too. The German-born designer Francis Cleyn was brought in to oversee work at Mortlake; the bronze specialist Hubert Le Sueur came from France; Rubens and Van Dyck both came from Antwerp; and Orazio Gentileschi from Italy (Guercino had resisted Charles’s blandishments). In Madrid Charles had seen the advantages of having a great artist attached to a dynasty – in the Habsburgs’ case, Titian – and wanted a similar relationship. For the ambitious king this role was played by Van Dyck, who arrived in London in 1632 and was promptly knighted and appointed “principalle Payn-ter in Ordenarie to their Majesties”.

As Arundel once noted, “His Majesty knows best what he hath gusto in” and he had gusto in Van Dyck. The feeling was reciprocated: few artists have served their master so well, dishing up images that perfectly combine majesty with ineffable glamour and insouciance. Under his brush, Charles’s woebegone features were transformed into those of a cavalier in such paintings as Charles I on Horseback with M. de St Antoine, 1633 (Royal Collection) and Charles I (“Le Roi à la chasse”), c1635 (Louvre).

The king was fortunate to be living at the same time as some of art’s greatest portraitists and he collected examples by Bernini, Rubens, Rembrandt and Velázquez. It was Van Dyck and Bernini combined who were responsible for the greatest lost work of Charles’s collection. Because the king couldn’t lure the great baroque sculptor to England to make a bust of him, in 1635/36 he commissioned Van Dyck to paint a triple portrait showing him from the front and each side to send to Rome in his stead. On seeing the painting Bernini is supposed to have exclaimed, prophetically: “Never have I beheld features more unfortunate.” Apocryphal or not, Bernini was right: when the bust arrived in England in 1637 the king rewarded the sculptor with a diamond ring worth £800, but the sitter would lose his head and the sculpture itself was destroyed in the Whitehall fire some 60 years later.

As a footnote, Le Sueur’s grand equestrian statue of the king was supposed to be destroyed, along with so many other emblems of monarchy, under Cromwell. It was sold to a metalsmith with the barely believable name of John Rivett for melting down. Rivett showed the parliamentarian commissioners some brass pieces that he claimed were all that was left of the statue. He went further, in fact, starting a lucrative sideline selling cutlery to both gullible royalists and parliamentarians that he claimed was made from the sculpture. In fact he had hidden it in the crypt of St Paul’s Church in Covent Garden and after the Restoration Charles II bought it and had it erected on the site of the old Eleanor cross at the bottom of Trafalgar Square, where the mounted king still looks down Whitehall towards the Banqueting House, the place of his execution.

It is the Banqueting House, the only complete remaining part of Whitehall Palace, that still contains the single greatest commission from Charles I’s reign, the nine huge ceiling panels painted by Rubens to celebrate the achievements of the king’s father, James I. The commission for this apotheosis came when Rubens was in London in 1629 in his role as a Habsburg diplomat, brokering peace between England and Spain. “I confess that I am, by natural instinct, better fitted to execute very large works than small curiosities,” noted the artist, but he was too busy composing 50,000 words of memos to Madrid to be able to work on the project, so the panels were painted on his return to Antwerp (initially to the wrong size since the English and the Flanders foot were of different lengths) and were installed in 1636.

The subject of the ceiling scheme was the wisdom of James I who, courtesy of the divine right of kings, had pacified and unified England and Scotland. The paintings were the last works of art Charles saw on 30 January 1649 as he was led through the Banqueting House to the scaffold erected outside. The father who had united the kingdom looked down on the last minutes of the son who had sundered it. And the great collection Charles had formed suffered the fate of the man who had made it.

“Charles I: King and Collector” runs at the Royal Academy, London W1, from 27 January to 15 April