A police spokesman said the closure order, under the Anti Social Behaviour Crime and Policing Act 2014, was heard before Brighton Magistrates and served on Thursday (April 26).
It prevents any person apart from the flat owner and certain family members from entering the premises at Flat 1, 20 Christchurch Road, Worthing, until July 25.
Police said they became aware of anti-social behaviour and criminal activities being conducted at the flat, including drug taking and dealing. Since November, 2017, until today, police have received 22 reports from the flat owner and neighbours of such instances.
PC Phil Cobby from the Adur, Worthing and Horsham Prevention team said: “The people visiting the flat were making the neighbours’ lives a misery by causing anti-social behaviour and drug misuse at the address.
“We worked closely with Worthing Homes to gain a part closure order on the flat which will help prevent this behaviour from continuing.
“Anyone who is seen to be at the property who is not named on the order as an exception will be arrested.”