The huge number of foreign workers in the small but wealthy Gulf natural gas producer means Qatari nationals account for only 10% of the population.
Currently, foreign residents and visitors can access basic public health care for free by paying a nominal fee for a government health card and employers are not obliged to provide additional private health insurance.
The law, which was carried on state news agency QNA on Wednesday, takes effect six months after it is published in the official gazette. No reason was given for the move.
It also requires all visitors to Qatar to purchase a health insurance plan that covers them while in the country, which is hosting the 2022 soccer World Cup.