Malcolm Turnbull announced the amendment to the ministerial code of conduct at an extraordinary press conference during which he slammed deputy Barnaby Joyce for causing "terrible hurt and humiliation" to his wife and four children.
"Barnaby made a shocking error of judgement in having an affair with a young woman working in his office," he said.
"In doing so, he has set off a world of woe for those women and appalled all of us.
Joyce, 50, has been under immense pressure since his affair with former media advisory Vikki Campion, 33, who is now pregnant with their child, became public last week.
More From This Section
It has led to allegations that he breached ministerial rules, with the crisis dominating the front pages and parliament question time, with calls mounting for him to resign.
Joyce, whose National Party is in a coalition with the prime minister's Liberals, will take leave next week, allowing him to side-step the role of acting leader while Turnbull is on a visit to the United States.
Foreign Minister Julie Bishop, as deputy Liberal leader, would normally step in if Joyce was unavailable. But she will also be travelling, which means Senate leader Mathias Cormann will take the position.
Turnbull said the break would allow Joyce to "consider his own position".
The prime minister could sack him, but that risks fracturing the ruling coalition and could cause a rift between the Liberal and National parties.
Joyce admitted to the affair after a picture of his pregnant lover was splashed across the front page of the Sydney Daily Telegraph, and has publicly apologised to his shattered wife of 24 years Natalie and their daughters.
"I am not here to moralise. But we must recognise that whatever may have been acceptable or to which a blind eye was turned in the past, today, in 2018, it is not acceptable for a minister to have a sexual relationship with somebody who works for them," he said.
"It is a very bad workplace practice. And everybody knows that no good comes of it."
As such, he amended the code of conduct to make unequivocally clear that "ministers, regardless of whether they are married or single, must not engage in sexual relations with staff".