A former employee of Memorial Sloan Kettering Cancer Center who walked into the Upper East Side hospital with bags he said were filled with explosives passed a Post-It note to workers there claiming he was being held against his will, court documents show.

Williams Johnson, 39, was charged with placing a false bomb, falsely reporting an incident and aggravated threat of mass harm for Saturday’s bomb scare, prosecutors said. He pleaded not guilty at his arraignment Monday, and was held on bail set at $50,000 cash and $150,000 bond.

Johnson walked into the lobby of the York Ave. medical center near E. 68th St. seeking access to the building’s 14th floor around noon, according to a criminal complaint. A worker there then passed Johnson a sticky note and asked him to jot down his doctors name, the complaint reads. .

On the note, Johnson scribbled, “I am being held against my will and I am unable to make a judgement. This is a life threatening bomb in my bag,” according to the complaint.

After passing the note back to the hospital worker, Johnson placed a backpack on a chair beside him and dropped a white bag on the ground before fleeing on foot, the complaint reads.

The resulting panic caused the hospital and surrounding buildings to evacuate and spurred a massive police response that included members of the NYPD’s Emergency Service Unit and Bomb Squad.

Bomb squad members scanned both bags with an X-ray and found the white bag contained wiring characteristic of an explosive device, according to the complaint. They then blasted the bag with a high-pressure water device, before finally determining it did not contain any explosive materials.

Cops took the ex-employee into custody that day.

No injuries were reported.

“Memorial Sloan Kettering Cancer Center security personnel detected an incident in the 1275 York Ave. lobby and promptly notified the NYPD,” the hospital said in a statement. “The situation was quickly contained and no one was harmed. NYPD has issued the all clear. We are grateful for the swift response of our MSK security team and the NYPD.”

Johnson is due back in court on March 20.

The bomb scare comes a week after two ISIS-inspired terror suspects chucked homemade bombs at a crowd of protesters at Gracie Mansion.

The bomb that was thrown didn’t go off, causing nothing but smoke, but an investigation later revealed it was packed with explosive material, plus metal nuts and bolts inside that could have been deadly if detonated.

The two teen suspects are facing a slew of federal charges, including the use of a weapon of mass destruction and attempted provision of material support and resources to a designated foreign terrorist organization.