The third degree has become a euphemism for the "inflicting of pain, physical or mental, to extract confessions or statements". Many who use it freely assume it has some connection with the criminal law.
'The third degree' is well-known to all U. S. crime-fiction enthusiasts as 'an intensive, possibly brutal, interrogation'.
In point of fact, the term has no connection with criminal or brutal treatment or mental torture. It refers to the third and final stage of proficiency demanded of one who seeks to become a Master Mason.
In Masonic lodges there are three degrees of membership; the first is called Entered Apprentice, the second Fellowcraft, and the third is master mason. When a candidate receives the third degree in a Masonic lodge, he is subjected to some activities that involve an interrogation and it is more physically challenging than the first two degrees. It is this interrogation that was the source of the name of the U. S. police force's interrogation technique, according to Charles Earle Funk, Editor-in-Chief of Funk & Wagnalls Dictionary.
In modern parlance, the expression is directly taken from the Exam for the Master Mason degree of Freemasonry - or the "Third" Degree.
The oral exam for the Third Degree, however, can last upwards of half-an-hour or 45-minutes - and the ENTIRE thing is done from memory... so it is QUITE exhausting.
The questioning runs along the lines of "What happened when you went to the Warden," "Why did he tell you that," "What did that signify," and "Where did you go after that?" To be personal about it, the exam is a *****, and made my head hurt - and from the Brothers to which I've spoken, all felt the same way.
SO... to give someone the Third Degree is to question them incessantly and never let any silence creep in, just constantly barraging them with questions... like in an interrogation.