Hugh Dane -- who played the popular security guard on " The Office " -- died from pancreatic cancer ... this according to his death certificate.

According to the doc -- obtained by TMZ -- Hugh Anthony Dane died on May 16, 2018 at 10:56 PM at his home in L.A. Pancreatic cancer is listed as the cause of death. As we reported ... a nonprofit org Hugh was involved with announced his death, but it was unclear exactly how or when he died.