"Philadelphia lawyer" means a lawyer (or sometimes someone in a different field) who is shrewd, a good arguer, and good at exploiting technicalities. The phrase can be either a compliment or an insult; it basically depends whether the person so called is on the same side as the speaker.
The expression originates in the case of John Peter Zenger, a German-American publisher who was tried for libel in 1735. Zenger's paper, The New York Weekly Journal opposed the appointed governor of the colony of New York, William Cosby. Most of the anti-Cosby material was probably written by James Alexander, co-founder of an opposition political party, who had proposed the idea of the Journal to Zenger in the first place. Cosby could not get a Grand Jury to indict Zenger or Alexander, but he managed to get two of the colony's Supreme Court Justices to issue a bench warrant for Zenger's arrest. Eight months later, Zenger's trial took place in New York, but his defense lawyer was Andrew Hamilton of Philadelphia, Pennsylvania, "perhaps the ablest and
most eloquent attorney in the colonies" according to the UMKC history of the case.
Cosby tried to interfere with jury selection, but even the two judges he had picked to try the case (the same two who had issued the warrant for Zenger's arrest) would not allow it. Once the trial started, Hamilton announced that Zenger admitted to having printed the material in question. The proscecutor, the colony's Attorney General Richard Bradley, responded, "As Mr. Hamilton has confessed the printing and publishing of these libels, I think the Jury must find a verdict for the king. For supposing they were true, the law says that are not the less libelous for that. Nay, indeed the law says their being true is an aggravation of the crime." This was indeed the condition of English libel law at the time, but Hamilton went on to argue that this should not be used to stop "the just complaints of a number of men who suffer under a bad administration." The judges instructed the jury that the law was the law and that it didn't matter if the material was true, essentially ordering the jury to find Zenger guilty. However, the verdict they brought back after a short period of deliberation was "Not Guilty" -- a case of jury nullification, where the jury feels that a law is immoral or not correctly applied to the defendant whose case they are trying, and so will not convict that defendant under that law.
Hamilton received a congratulatory dinner and a cannon salute in his honor in New York before he returned to Philadelphia. The case became one of the foundations of freedom of the press in the United States, and "Philadelphia lawyer" became a name for a clever and astute lawyer. It was found in such expressions as "Any three Philadelphia lawyers are a match for the devil," and "It would puzzle a Philadelphia lawyer." Not surprisingly, "The Philadelphia Lawyer" is the name of the Philadelphia Bar Association's journal.
"Philadelphia Lawyer" is also the title of a song written by Woody Guthrie about 1937 (and covered by many other artists, notably Rose Maddox & The Maddox Brothers); the same song is also known as "Reno Blues." Based on a true story but also taking off from the old ballad "The Jealous Lover," it concerns a Philadelphia lawyer who tries to woo a married woman out west: "I'll win you a divorce from your husband/And we can get married tonight." However, that cowboy husband finds out about this, and the song ends,
"Now back in old Pennsylvania,
Among those beautiful pines,
There's one less Philadelphia lawyer
In old Philadelphia tonight."