The proposed legislation would apply to those above 21 who are convicted of crimes that include culpable homicide, rape and sex with minors.
In a joint statement, the law and home affairs ministries said the measure would be a "severe sentence" but would "better protect the public from dangerous offenders".
It added that as a safeguard, it would be the court that decides if an offender falls under what it calls the sentence for enhanced public protection.
Cases cited by the ministries include a man who in 2020 sexually assaulted his 12-year-old stepdaughter within two years of being released from prison for the rape of his 11-year-old niece.
"We want to ensure that such dangerous and high-risk offenders are not released back into the community until they no longer pose a threat to public safety," the statement said.
"Our current sentencing options are inadequate to deal with such egregious offending."
Under the proposed bill, such offenders would not be automatically released after completing their prison terms, unless the home affairs minister deemed they were no longer a threat to the public.
An offender can be detained for life but would be subject to regular reviews to assess their suitability for release, it said.
The bill will be debated by lawmakers at a later date but is likely to be passed, with the ruling People's Action Party holding a majority of parliamentary seats.