An SNP amendment to the King’s Speech – which calls for an end to hostilities – is expected to come to a vote in the House of Commons this week, with the party urging other MPs to support it.
Mr Sarwar has broken with the UK Labour leadership on the issue, despite his initial reticence to confirm he supports calling for a ceasefire.
Sir Keir Starmer has come under increasing pressure to back the calls, both from inside and outside Labour.
The SNP vote – expected on Wednesday – could present an issue for Sir Keir if his MPs back calls for a ceasefire.
In his letter, Mr Yousaf wrote: “As you will be aware, I have been calling for an immediate ceasefire for a number of weeks now.
“I welcome the stance you have taken as leader of your party in backing those calls for a ceasefire, in stark contrast with the position taken by Sir Keir Starmer.
“Given that Scottish Labour has two MPs, I am urging you to confirm that they will vote in accordance with the policy you have set out as their leader – which is widely supported among the general public in Scotland and across the UK, as well as by the United Nations and its aid agencies – rather than the inadequate position being taken by Sir Keir.
“If both Scottish Labour MPs choose to defy you as leader of Scottish Labour by not backing a ceasefire, they will not only be out of step with the Scottish public, but on the wrong side of history.
“Given the mounting death of innocent children, women and men, nothing less than an immediate ceasefire can meet the humanitarian needs of the moment.
“I trust that you are in a position to offer this reassurance regarding how Scottish Labour’s two MPs will vote.”
Speaking to the Daily Record at the end of last month, Mr Sarwar said comments made by Sir Keir – which have since been rowed back – that Israel had the right to cut off food and water from Gaza had been “hurtful”.
He added there would be “repair work to do” with Muslim communities ahead of the next general election, but said the Labour leader had been “pained” by the comments.