It's a tale that might be told over tiffin on the veranda, or more likely in a parlour in the home counties among dusty photographs and leather-bound reports. It is a story about the British and India; the India the British brought home, the subcontinent they imagined. It is the story of the India Museum.

The India Museum was no Borgesian conceit; it really did exist, physically and institutionally, a phantom collection of a phantom orient, an India buried in London, skulking on Leadenhall Street, forgotten in Whitehall, lost near the Thames, displayed in South Kensington. The museum is mentioned in old guidebooks to London; its reports are in the British Library; and an administrative history by Ray Desmond was published by Her Majesty's Stationery Office in 1982. So it must have existed - but the India Museum has so completely vanished from memory that it seems hard to credit there ever was such a place. Even the museums that inherited its collection make little of their debt. No one, after all, wants to rake up a less than noble chapter in the cultural history of the British Empire.

The story of how the British took over India as a trading venture managed by the East India Company in the 18th century and then, after the Indian uprising of 1857-58, ruled it directly until 1947, is an epic containing many histories. Today's most popular ones rehabilitate the Raj, seeing largeness of heart in tales such as that of how British explorers rediscovered Buddhism. And yet the narratives of India the Victorians told themselves tended not to be confident but anxious; narratives like Arthur Conan Doyle's The Speckled Band, in which Sherlock Holmes investigates a mad doctor returned from Calcutta to Surrey, who has brought back with him a hellish menagerie.

India itself was imagined as a rare object: the "jewel in the crown". But for every cooing visitor to the Koh-i-Noor diamond in the Tower of London, there was an eerie story of a collectible with a curse.

The India Museum became the biggest curse of all. Its principles were impossibly large, as if the project were to contain all of India in one room. A guidebook to the original museum in East India House, from 1851, confessed that it was so squalid it seemed "almost subterranean". In all its increasingly unsatisfactory relocations, the India Museum was crammed, claustrophobic and amateurish, critics complained. "It is practically inaccessible, and hid away out of sight, and when you get to it you find a bonded warehouse and not a museum in straightforward airy order," complained the journal the Orientalist in 1869.

The collection was a real cabinet of curiosities - one of the last of those chaotic, dreamlike hotchpotches that were the predecessors of the modern museum. The collection was conceived at the same time as Sir John Soane's private museum, and had the same unruly quality. It was criticised for being more like a private collection than the public-spirited British Museum, but a private, whimsical collection is what it was.

But where Soane's museum expresses the identity of one man, the East India Museum, which opened along with a library in the opulent new East India House on Leadenhall Street in 1801, reflected the enthusiasms of writers, governors general, employees of the company. If this happened to be the inscription tablet of Nebuchadnezzar II from the ruins of Babylon (today's southern Iraq), collected by the Bombay presidency in 1797, the Museum displayed it. If someone gave three elephant heads, it displayed those.

Something far less rational was going on here than the enlightenment project dreamed of by Warren Hastings, impeached 18th-century governor general of India and one of the museum's founding minds, who praised the company for its "desire to add the acquisition of knowledge... to the power, the riches and the glory which its acts have already so largely contributed to the British Empire and Name".

Hastings was a man of the enlightenment, who insisted - in contrast to later British rulers of India - that his men learn their de facto subjects' languages and revered "the Braminical writings, the most ancient perhaps of any now extant". But the history of British imperialism is a story of shrinking minds. Just as the mixture of rapaciousness and curiosity that characterised 18th-century colonisers gave way to Victorian hypocrisy and racist ignorance, the India Museum degenerated from scholarship to entertainment.

The degeneration was already visible in the scheme proposed by its first curator, Sir Charles Wilkins, in 1799. The three fields of collection he specified in his plan are "A Cabinet of Natural Productions", "Artificial Productions" and "Miscellaneous Articles". Fine arts were not mentioned. The founders made no analogy between their idea of the fine arts and the explosively beautiful visual productions of India. These entered the museum in huge quantities and spectacular quality, but under the heading of "curiosities".

It was the eccentricity of the collection that made the East India Museum a runaway success at the beginning of the 19th century. It was a place to be seduced and horrified. The most famous exhibit was the most macabre. It is still the most popular Indian artefact in London, and the very quintessence of a "curiosity".

In 1814 a young woman from the provinces visited London. She went to the museum at East India House, one of the capital's attractions. There she shuddered to hear a dreadful moan, as of a man dying. She came face to face with a painted wooden tiger in the act of devouring its white-faced, red-coated victim. As the curator worked it, she had to be escorted from the museum "pale and trembling".

This happens in a novel, but crowds were in reality rapt by the "Man-Tyger-Organ", sent back by the governor general in 1800 after the storming of Seringapatam and the bloody British suppression of the Islamic ruler of Mysore, Tipu Sultan, who on the eve of the concluding battle in the fourth Mysore war declared, "Better to die like a soldier than to live a miserable dependent of the infidels on the list of their pensioned rajas and nabobs!"

Tipu died in battle and his capital was ransacked by the drunken victors. "The property of everyone is gone," recorded the Duke of Wellington, who ended the looting by "hanging, flogging, etc".

Tipu identified with the tiger, and had his famous machine made probably with an Indian painted body and a French mechanism. His tiger was the museum's secret weapon, a black comic delight that fitted perfectly in Regency London where Frankenstein and The Vampyre were favourite reading. Burning bright in the gloom, it was played by visitors who took it in turns to make the victim moan with pain and terror.

Tipu's tiger epitomises the arcane atmosphere of the museum at East India House. This curiosity shop that claimed to depict in its clogged space India, and indeed the orient, was regarded by the mid-19th century as shameful and vulgar.

The Great Exhibition in 1851 transformed the very idea of exhibition. As well as expanding the India Museum, with a vast array of Indian "products" originally shown in the Crystal Palace, there was a reformist attempt to create a "New Museum" of manufactures, systematic natural history, sombre imperial common sense. Models were introduced depicting "the Indian races and their tools". Victorians could inspect simulacra of an Indian law court and a camp of Sepoy soldiers in the British army.

This more scientifically collected India reopened at a moment of crisis, when it looked suddenly as if the jewel of the empire might be ungovernable. The hysterical fantasies written, drawn and painted of "The Indian Mutiny" permanently transformed British attitudes to India.

The effect on the museum was direct and practical. Rule over India passed from the company to the British state, and as the company shrivelled, with East India House demolished in 1863, its collection passed into the hands of the new India Office, to be administered by Dr John Forbes Watson.

And it had no home. In 1861 it reopened temporarily at Fife House near the Embankment, in 1869 in cramped quarters in the India Office, in 1875 in rooms rented from the South Kensington Museum, now the V&A. In 1879 it was dissolved.

The India Museum went from a hugely popular London institution to a dusty failure overnight. The British response to the mutiny, the determination to govern India more effectively, went along with a hardening of attitudes to "natives" and a deepening ignorance. In one of his Plain Tales from the Hills, Rudyard Kipling sums up the imaginative barrenness he saw as a betrayal of true imperialism: "India, as everyone knows, is divided equally between jungle, tigers, cobras, cholera, and sepoys."

The death of the India Museum was not a healthy act of anti-imperial house-cleaning but, on the contrary, the failure of interest of a Britain entering its full arrogance. This is encapsulated by the fate of the most intellectually and aesthetically valuable treasures the museum collected. In 1866 James Fergusson, pioneer of Indian architectural history, went looking for the sculptures from the great stupa at Amaravati, not in India, but in London, where they had been brought in the early 19th century. He remembered seeing them at the old India Museum. But when he visited the new premises, he found just one fragment, exposed to the elements. He discovered the rest of the reliefs in a shed. Fergusson's book about these 2,000-year-old marvels was published in 1868, with the backing of the India Museum, and led to a recognition of one of the earliest and greatest masterpieces of Buddhist art. The great stupa at Amaravati, a vast domed religious centre, whose surviving representations of the life of the Buddha date mainly from the first to third centuries AD, was rediscovered in ruins in the 18th century, but its excavation and eventual correct evaluation by British scholars is marred, as a story of British enlightenment, but what happened in the 1860s.

Much as British intellectuals might increasingly recognise the greatness of India's "venerable civilisation and native artistic genius", as a supporter of expanding the museum put it in 1868, the India Office was desperate to be rid of its collection. The British public no longer found India fascinating. Queen Victoria, who became Empress of India in 1876, never went there. Kipling's tales of the Raj celebrate - and criticise - a small elite; the numbers of British in India were never huge, their interest, such as it was, evidently not shared by the mass of the British. India and Britain did not have a special relationship after all.

The museum's collection was dispersed in 1879, but now forms the basis of the V&A's superb collection of Indian art. The Amaravati sculptures and the inscription of Nebuchadnezzar are among the treasures of the British Museum. Natural history specimens passed on to the Natural History Museum, while other items went to Kew gardens. The India Museum is all around us.