Edward Fitzgerald QC told the court Mr Javid’s decision was taken “against advice from officials” that an assurance should be sought.
The barrister said it was influenced by the “anticipated outrage” of members of the Trump administration if the UK asked for assurances that the pair would not face the death penalty.
He told the court: “We say that, in taking those steps, he wrongly exposed the suspects to the very real risk of an inhuman punishment.
“We say this country should not facilitate the imposition in another country of a punishment which we ourselves recognise as inhuman and unlawful.
“He took those steps in large part because of the anticipated outrage of certain political appointees in the Trump administration if the UK insisted on death penalty assurances.
“We submit that the anticipated outrage of those US officials was not a proper consideration as a matter of law.”
Kotey and Elsheikh, who were raised in the UK, are believed to be detained by Kurdish forces in Syria and have been stripped of their British citizenship.
They are said to have been members of the cell which also included Mohammed Emwazi, known as Jihadi John, who was killed in a US air strike in 2015, and Aine Davis, who has been jailed in Turkey.