“In New York, you can be a new man,” croons the chorus during the opening of the contemporary Broadway smash Hamilton. It is an insight as true today as it was during the colonial period. From the Bavarian immigrant Freidrich Drumpf, who turned himself into Frederick Trump (grandfather toThe Donald), to the most recent arrival at Port Authority or JFK, Manhattan has always been the place where people come from all over the world to reinvent themselves. Given the frequency of such transformations and the secrecy with which newcomers discarded their old identities for shiny new ones, we may never know who was the most accomplished of Manhattan’s legions of shapeshifters. But one of the leading contenders for the title would have be the figure known at the turn of the last century as Guillermo Enrique Eliseo.

With an apartment on Central Park West and an office on Wall Street, Eliseo was, to all appearances, a fabulously rich Mexican banker—“without doubt the wealthiest resident of the City of Mexico” as one newspaper reported in 1897.

In reality, however, Eliseo had begun life in slavery, an African American born on a cotton plantation in the small, dusty South Texas town of Victoria.

To escape the Jim Crow South, the young William Henry Ellis relocated to Manhattan in the 1890s. Fluent in Spanish from his childhood along the Mexico border, he soon persuaded his new acquaintances that he was from a well-to-do Mexican family—an enticing pose to Wall Street investors at a time when almost every item in the U.S.’s burgeoning consumer economy owed its origins in one way or another to Mexican resources, from the Mexican copper used to electrify American cities to the Mexican rubber that went into making tires for the newly invented automobile.

Ellis’s remarkable talent for reinvention made him arguably the first African American on Wall Street (his only known rival for the crown being Jeremiah G. Hamilton, a black man who made his fortune in the 1840s, when Wall Street was still in its formative stages). Yet as his experience in New York demonstrates, even an accomplished trickster like Ellis, who managed to evade the defining phenomenon of his age—the color line—could himself be tricked, especially when sex and scandal were added to the maelstrom of shifting identities that was Gilded Age New York.

Among Ellis’s earliest acquaintances in the city was an actress named Fayne Strahan. Strahan was another newcomer to Manhattan, having grown up in Atlanta with her widowed mother. Ellis quickly became enamored of the young white woman, whom contemporaries labeled “a ruinous beauty,” and wooed her with a sealskin coat and other expensive gifts. Little did he know, however, that Strahan was sizing him up for a con known as the “badger game.” After gaining the mark’s trust, the female member of the con team would lure her target into a compromising situation. At this point, a male accomplice would burst in and, claiming to be the woman’s husband—or in some variations, her brother or father—demand money to hush up the apparent outrage. In an age in which adultery carried considerable stigma, this “badgering” was an effective ploy, securing money from the mark while discouraging him from going to the police, where he would have to confess to an awkward intimacy with the female member of the team. (One can see a variation of this venerable ploy in Hamilton, where it triggers much of the action in the second act.)

Yet after months of toying with Ellis, Strahan and her partner (and secret husband), William A.E. Moore, elected to spring their trap on Martin Mahon, the well-to-do proprietor of the New Amsterdam Hotel, instead. Accomplished con artists, Strahan and Moore had caught wind of Ellis’s masquerades long before he picked up on theirs. Mahon, however, was that rare mark who pursued prosecution, perhaps because Moore had gratuitously clubbed him on the head with a revolver upon surprising him with Strahan. The subsequent trial dragged a reluctant Ellis into the public spotlight, threatening to undo his carefully crafted persona. Called into court as a witness, Ellis identified himself as a “a broker in Wall street” and dazzled audiences with his refined appearance: a “long brown overcoat of costly texture,… [a] thick white silk handkerchief around his neck… fingers sparkl[ing] with many valuable diamonds.” Although trial testimony raised doubts as to Ellis’s background, it soon became clear that he was not the only figure in the courtroom with an interest in seeing his identity as an upper-class Latin American maintained. Strahan, anxious to preserve an image of herself as a proper white woman, remained adamant throughout the trial that Ellis was not her “negro friend” but in fact a “high toned Cuban gentleman.” So, too, did Strahan’s mother in her interviews with a New York press corps consumed with the scandal. With the Strahans unexpectedly vouching for his Latin background, Ellis managed to weather the trial and return to Wall Street unscathed.

There were abundant reasons why the Gilded Age proved a golden era for shapeshifting. At the close of the 19th century, the city ballooned in size to more than three and a half million souls, yet official record-keeping lagged far behind. With birth certificates, drivers’ licenses, and passports all but non-existent, residents could rarely rely on documents to determine the identity of those they encountered. Instead, they were forced to resort to appearance, accent, and other clues to discern a new acquaintance’s social standing. Since such traits were not fixed, however, the risk remained that one’s companion was not who he or she claimed to be. The resulting confusion over whether outward presentation matched inward self was one of the features that rendered the burgeoning metropolis of Manhattan such a disorienting place for many of its newest arrivals—and such a perfect spot for those seeking to reinvent themselves.

Even after the spectacular failure of his courtship of Strahan, Ellis continued to entertain thoughts of matrimony, eventually marrying a young white woman named Maude Sherwood in 1903. In the press release that Ellis issued announcing the nuptials, he stated that he and his bride had met in Great Britain on the estate of the Hotchkiss family and that Sherwood descended from English nobility: “Bride—Only daughter of Thomas Clark Sherwood of Mayport, England… grandniece of Lord George Armstrong (deceased)… Grandniece of Sir William Hy. Watson (deceased) at one time Baron of Exchequer. Related to Sherwoods of Nottingham, Clarks, Lightfoots and Watsons.” Census data, however, reveal that Sherwood was not born across the ocean in Great Britain but across the Hudson River in Jersey City. It was true that her father was from England, having emigrated in 1870. But he was no aristocrat, working instead on the docks as a clerk and shipping agent for a steamship line. By 1900, around the time Maude first met Ellis, she and her widowed father were living in a boarding house in Lower Manhattan, and Maude’s profession was listed as “stenographer.” Given her profession, age (13 years younger than Ellis), and working-class, New York background, Sherwood and Ellis, rather than meeting at a soiree on the Hotchkiss estate, could only have encountered each other in his office or some other work setting. Sherwood, it turns out, was not averse to embellishing her autobiography, just as her new husband had burnished his. Together, they guarded each other’s secrets and assisted in the other’s reinvention: Maud’s whiteness gave added credence to Ellis’s claims to elite Mexican status, while Ellis’s wealth furthered Maud’s pose as a British aristocrat.

New York did not have laws barring marriage between blacks and whites in the early 1900s, making it one of the few states not to draw the matrimonial color line. But as The North American Review explained, “Even in commonwealths where mixed marriages are lawful they are extremely rare, and are visited with the severest social reprobation.” Campaigns against Manhattan’s vice districts invariably focused their horror on the city’s “Black and Tan” clubs where black men and white women mingled with one another—a phenomenon, in the words of Police Commissioner William McAdoo, that ran “counter to violent racial prejudices and traditions… an unmitigated and disgusting evil.” Ellis’s Latin identity thus proved valuable for romance as well as business. At the wedding, held at Grace Episcopal Church (even though, as a proper Mexican, Ellis publicly identified as Catholic), Ellis insisted on being referred to as Guillermo Enrique Eliseo. Recalled the tongue-tied minister, “I had great trouble pronouncing Mr. Eliseo’s name, and we had a laugh over it.”

As the historian Alyson Hobbs points out in her recent prize-winning study of passing, A Chosen Exile, there could be great “loss, alienation, and isolation” in reinventing oneself, as individuals severed connections to family, culture, and community to pursue their masquerades. But passing also offered liberation—and even the occasional chance to ridicule prevailing conventions, as an incident that occurred to Ellis and Sherwood shortly after their wedding reveals.

A prominent merchant and probable former slave owner from Ellis’s hometown of Victoria, Texas, in Manhattan on business, found himself relaxing at a racetrack outside the city one summer weekend. Not long after he took his seat, a waiter showed up with a bottle of wine, “compliments of W.H. Ellis.” Not remembering the name, the merchant asked for clarification. The waiter pointed out Ellis, sitting nearby with his new wife; Ellis responded to the shocked stare of the visitor from Victoria with a wink and a wave. The distance Ellis had traveled from Victoria to Manhattan could be measured in many ways, but perhaps none more profound than this simple exchange.

The author of The Strange Career of William Ellis: The Texas Slave Who Became a Mexican Millionaire, Karl Jacoby is a professor of history at Columbia University. The author of two previous books, he has won the Albert J. Beveridge Award and a Guggenheim Fellowship, among other honors. He lives in New York.