A man has been arrested in Melbourne after allegedly trying to sell drugs to uniformed officers from the window of his car.

The 26-year-old was parked in Power Street in Southbank, near the CBD and Crown Casino, when the officers approached the vehicle about 1:30am today.

"He allegedly asked police if they were there to buy drugs and if they wanted the good stuff," Victoria Police said in a statement.

The officers, from the nearby Southbank police station, were on Power Street to investigate a report that another man's car had been broken into.

However, the officers approached the wrong car, and instead of discovering a break-in, came across a man in the driver's seat who was allegedly looking to offload drugs.

A subsequent search of the vehicle located 1,000 tablets, which are believed to be ecstasy, as well as the methamphetamines ice and speed.

Almost $6,000 in cash was also discovered, police said.

The man from Melton, west of Melbourne, was arrested.

He has been charged with trafficking and possessing proceeds of crime.

"Fate has conspired to deliver an alleged drug dealer into the hands of police," the police statement said.