Today we pronounce it “PITTS-burg.”
I’ve seen respectable historians who suggest that, at the founding, it was pronounced “PITTS-burrah,” as in Edinburgh, since Pittsburgh was named by a Scotsman.
But we can find some evidence that, two hundred years or more ago, country people in Western Pennsylvania—not necessarily the people in town themselves—pronounced it “PITTS-berry.”
In the early 1800s, the distinctive Western Pennsylvania dialects had not yet developed; country people in western Pennsylvania spoke the way rural people all over the North spoke. In northern American rural speech of the early 1800s, the schwa sound at the end of a word was often replaced by the -y sound. Artemus Ward’s comical schoolmaster quotes printing-specimen Latin: “Quosque tantrum, a butter, Caterliny, patent nostrum!” (The original is “Quo usque tandem abutere, Catilina, patientia nostra?” from Cicero’s First Catiline Oration, which was ubiquitous as filler text in typefounders’ and printers’ specimen books.)
Thus, very probably, the pronunciation “PITTS-burrah” would become “PITTS-berry.”
So far this is only speculation. But we can find a tiny piece of evidence in the Union Cemetery, an old churchyard in Robinson Township, which would have been well out in the country in the early 1800s.

This stone is regrettably so badly damaged that we can read nothing on it. But a plaque in front of the stone identifies it as belonging to Thomas Thornberry, a Revolutionary War veteran. Presumably the name is entered thus in the burial records.
Beside his stone is a legible stone for a woman who is obviously his wife.

IN MEMORY OF
DINAH Wife of
Thomas Thornburgh
who departed this life
July 26th, 1830,
aged 70 years.
And here is our evidence. Inscriptions on tombstones of the early 1800s around here are commonly semi-literate; it is common to find variant spellings of the same name. Here we have the same name spelled “Thornburgh” and “Thornberry.” Now, it is not possible to imagine the name “Thornberry” being pronounced “THORN-burg,” but it is quite possible to imagine “Thornburgh” passing from “THORN-burrah” to “THORN-berry” in the rural American accent of two hundred years ago. And if that is the case, then we have evidence that, in western Pennsylvania, the spelling “-burgh” indicated the sound “-berry” at least to some residents as late as 1830.
But the residents of the borough themselves might have regarded that pronunciation as the mark of a hick. I’ve been reading Hugh Henry Brackenridge’s Incidents of the Insurrection in the Western Parts of Pennsylvania in the Year 1794, which is a riveting story of the Whiskey Rebellion told by a very clever man. One of the things you can’t help noticing is the wide cultural difference that already existed between Pittsburgh and the surrounding countryside. Pittsburgh was already developing urban sophistication of a sort, and the country people hated it. How will we prevent them from burning Pittsburgh?—that’s the constant anxiety of people in town. It was clear that a large portion of the mob was ready to use the revolt against the whiskey excise as an excuse to loot and destroy the borough, taking their revenge on all those people who thought they were better than honest country folk. In one telling episode, Brackenridge and his town friends have a good laugh at an illiterate notice posted by a country rebel in a tavern—only to turn and find two or three country people seething with resentment. As usual, Brackenridge saved his skin with a joke. “I turned it off suddenly, by saying, that it was no matter; he did not spell well; but he might be a good soldier, and sight well. This restored their good humour.”
All of this is speculation on top of speculation on top of a molehill of evidence. But speculation is most of what you will see here, so you might as well get used to it.