A man has been charged after allegedly trying to deliver drugs hidden in a fruit basket to a quarantined traveller.

Yesterday afternoon about 1.15pm a man, 37, went to a hotel on Elizabeth Street in Sydney to make a delivery to someone in isolation.

Police searched the box and allegedly found a white envelope containing an MDMA capsule.

A man allegedly tried to deliver drugs in a fruit basket. (NSW Police)

The man, from Lane Cove, was arrested and when officers searched him, they allegedly found a bag of white powder, believed to be cocaine, New South Wales Police said.

He was issued a Court Attendance Notice for supply prohibited drug and possess prohibited drug.

Police allegedly found one MDMA pill in an envelope. (NSW Police)