The storage of personal information such as DNA, fingerprints and facial images is to be controlled under a bill before the Scottish Parliament.
It wants an independent commissioner to be appointed to improve the way biometric data is handled by police.
Ministers said this would ensure investigations were carried out in a lawful and ethical way.
The move follows an independent group’s report on the need to balance public safety with individual rights.
DNA samples are the very essence of personal data yet there is no code of practice for the police and justice agencies, who rely on the information it contains to help them fight crime.
The Scottish Biometrics Commissioner Bill aims to give greater oversight of how the police take, store, use and dispose of data such as DNA samples, fingerprints and facial recognition images.
Scotland’s Justice Secretary Humza Yousaf said technological advances in biometrics had brought huge benefits to police and other justice agencies in detecting, preventing and prosecuting crime.
But the minister said their use also raised a number of ethical and human rights considerations.
He said: “There is not yet a single commonly-recognised set of working standards around biometrics.
“The new Commissioner and the code of practice will complement the work of others, including the Information Commissioner, and help maintain public confidence in how new technologies and data are being used to help keep crime down and communities safe.”
The publication of the bill followed the report of the Independent Advisory Group on Biometric Data, chaired by the human rights lawyer John Scott QC.
He said: “Biometric data, including existing technologies relating to fingerprints and DNA, are used to promote public safety in various ways.
“The new framework will ensure that this is done while taking full account of the rights of the individual, not least the right to privacy and security when it comes to the most personal information about them such as can be derived from biometric data.”
Fingerprints and DNA evidence are gathered by police and analysed by scientists at the Scottish Police Authority (SPA) laboratories for the Crown Office, which prosecutes all crime in Scotland.
Tom Nelson, the SPA director of forensic services, who sat on the advisory group, said Scotland was already leading the field in the way biometric data was stored.
He said following a £6m investment in new forensic capability in 2015, Scotland was the first country to introduce a new analytical standard where scientists look at 24 areas of each DNA sample, compared to the European norm of 17.
But he added it was important the high standards were maintained as technology continued to develop.
Mr Nelson said: “We all are leaving our biometrics and fingerprints everywhere in relation to our access to multi-media, and our access to phones.
“And therefore we want to try to make sure, as some of these areas of technology come in, we actually have a robust process in place to ensure we are keeping things to the appropriate standard moving forward.”
The new Biometrics Commissioner will be appointed by Holyrood and will be accountable to MSPs.
They will be able to make recommendations if they believe an organisation is not adhering to the code of practice, which could lead to the relevant body being called to account to parliament.