Vartan Gregorian, educator, historian, philanthropist extraordinaire, was an irresistible and inspirational force during six decades of public service in America, his adopted home.

Blessed with twinkling eyes and God-given charm, Gregorian raised and spent hundreds of millions of dollars to spread learning and promote the cause of peace. He was a friend and mentor to young and old, from the waiter in the local restaurant to the rich and famous.

An Armenian raised in Iran, Gregorian made his reputation with the rescue of the New York Public Library, destitute and demoralised after the city verged on bankruptcy in the mid 1970s. He took charge in 1981, smarting after his failure to become president of the Ivy League University of Pennsylvania. (He was reportedly “too ethnic” and had “a thick accent”.)

He set about his new challenge with boundless energy. “Until Vartan arrived, the Library was viewed as a public service like sanitation or garbage collection,” says Greg Long, one of the senior management team, “Vartan made it a cultural institution, stressing its centrality to the city, alongside the Botanical Gardens and the Metropolitan Museum of Art.”

It was a monumental task. Three million books, many of them extremely valuable, were crumbling or gathering dust. The immediate surroundings were infested with drug dealers and pimps. The back of the library had become “New York’s longest urinal”, Gregorian later wrote in his autobiography The Road To Home.

The cost of the refurbishment was initially calculated at $1bn, later pared back to $479m, still an extraordinary sum in those days. But Gregorian won everyone round to the cause, from Mayor Ed Koch to Wall Street and, most important, Brooke Astor, the legendary philanthropist, socialite and honorary chair of the Library’s board of trustees.

Astor and Gregorian were the ultimate double act. She also introduced him to high society — from Jacqueline Kennedy Onassis to Henry Kissinger — and to the very best restaurants.

But he built a dazzling network of contacts, later to prove invaluable during his 24 years as president of the Carnegie Corporation, the philanthropic foundation established in 1911 by the former steel baron Andrew Carnegie to champion the cause of education and international peace.

Like Carnegie, an immigrant from Scotland, Gregorian came from humble origins. He was born to a Christian Armenian family in Tabriz, an ancient city and original site of the Garden of Eden, by some accounts. He lost his mother as a child, was estranged from his father and tutored by an illiterate grandmother, mainly through storytelling, of which he became a master.

Many years later, he would repeat her advice “Don’t insult a crocodile before you cross a river”; or, tellingly in light of his later achievements, “You don’t make a name for yourself on what you are going to do.”

In his mid teens, he left Iran for better schooling in Beirut, Lebanon. He was taken in by the Armenian diaspora, later winning a place at Stanford University. From there, despite shaky English, he embarked on an academic career spanning San Francisco State College, the University of Texas at Austin, before becoming provost at the University of Pennsylvania and the first foreign-born president of Brown University.

His move to Brown from the New York Public Library caused some resentment (“we wanted to work with him forever”, says Long); but Gregorian was determined to rectify the wrong he had suffered at UPenn and head an Ivy League university.

I met Vartan Gregorian through my wife who had encountered him at a New York fundraiser in 2003. When he discovered they shared the same initials, he insisted on dinner with his wife, Clare, a steadying presence during their many decades of marriage.

At Carnegie, where I serve as a trustee, Gregorian presided over an endowment of around $3.5bn, allowing him to dispense several hundred million dollars a year to good causes. He would read the application for every grant, however small.

He wore his intellect lightly, often dispensing wisdom through aphorisms. When he was dreaming up some new Carnegie award, he would occasionally stop and declare: “These walls have mice. And mice have ears.”

Gregorian never forgot how the US had embraced him as an immigrant and naturalised citizen. America, he often said, was not so much a country as an idea, where civic responsibilities needed to be taught and not taken for granted.

Cemeteries, he wrote, were full of irreplaceable people. Gregorian, who died in hospital shortly after turning 87, was indeed unique. He is survived by his three sons, Vahé, Raffi and Dareh.