Business Secretary Greg Clark and Health Secretary Jeremy Hunt said such a deal would be "in the interests of public health and safety".
"The UK would like to find a way to continue to collaborate with the EU," they wrote in a Financial Times letter.
There are fears Brexit may cause delays in UK patients getting new drugs.
Currently the London-based European Medicines Agency (EMA) authorises drugs for use across the EU, including the UK.
However, it is expected to move out of the UK after Brexit, raising uncertainty over whether the UK will need to develop its own separate drug approval system.
Industry experts have warned that if this happens pharmaceutical firms could be slower to seek permission for their drugs to be used in just one country, focusing instead on getting their drugs approved for larger, more lucrative markets.
The UK pharmaceuticals trade association has also warned that Brexit could undermine future investment, research and jobs in the country.
But speaking on the BBC's Today programme, the UK managing director of US drugs giant Pfizer, Erik Nordkamp, said there were other issues than Brexit that the industry wanted to see addressed.
"The letter in the FT this morning is significant... because it acknowledges there are some risks that need to be addressed with regulation, with trade, but at the same time the government needs to address the long-standing issues that are there."
The ministers wrote that the UK "will look to continue to work closely with the European Medicines Agency (EMA)."
"Our overall aim is to ensure that patients in the UK and across the EU continue to be able to access the best and most innovative medicines," they added.
In the letter, they cited examples where the UK and EU partnership had helped patients, including the licensing of 130 products to treat rare diseases.
In an attempt to reassure the industry, they also said if it wasn't possible to arrange "our desired relationship with the EU", then Britain would "set up a regulatory system" to process drugs licences "as quickly as possible."
In April, EMA executive director Guido Rasi said continued co-operation was theoretically possible but it would be up to EU governments to decide whether to offer such a deal.
Pharmaceutical firms have been pushing for some kind of clarity over what the UK's exit from the EU will mean for the industry.
Mike Thompson, chief executive of the Association of the British Pharmaceutical Industry, said the ministers' letter was "a welcome recognition that the future of medicines regulation is a key priority for the government".
The UK will continue to co-operate with the European Union on medicine testing after it leaves the bloc, two senior ministers have suggested.