Humza Yousaf, Minister For External Affairs, has written to UK Foreign Secretary William Hague detailing the Scottish Government's gesture to welcome "any Ugandan" persecuted by the new laws.
It comes on the back of an outcry from the international community at the Ugandan anti-gay legislation and concern over the welcome being extended to countries with anti-gay laws during the Glasgow 2014 Commonwealth Games.
With prominent members of the Ugandan government due in Glasgow this summer, the Scottish Government will also meet representatives of LGBT (lesbian, gay, bisexual, and transgender) groups to discuss proposals on handling human rights issues during the event.
Ugandan leader Yoweri Museveni this week signed a bill that includes life sentences for gay sex and same-sex marriage.
The Commonwealth country had already outlawed same-sex relations but the new law allows life imprisonment as the penalty for acts of "aggravated homosexuality" and also criminalises the "promotion" of homosexuality", where activists encourage others to reveal publicly they are gay.
Lesbians are covered by the bill for the first time.
A day after President Museveni enacted the law a Ugandan newspaper published a list of what it called the country's 200 top homosexuals, including some who previously had not identified themselves as gay.
In his letter Mr Yousaf has urged Mr Hague "to offer asylum to any Ugandans who feels threatened or persecuted by the legislation", adding that "Scotland will play her part in providing asylum for those seeking refuge from this draconian legislation".
He adds that during the Games "no one from any part of the Commonwealth who visits Scotland will be under any doubt about our values as a welcoming, open and tolerant society".
A senior source said: "The issue is now so high profile it is hardly something the Scottish Government or anyone involved in the Games can now shy away from."
Some 41 nations in the 54-member Commonwealth have laws banning homosexuality, many of which date to British Empire legislation that was never repealed.
It is understood discussions with LGBT groups will also focus on other nations with draconian anti-gay laws, such as Nigeria, with efforts also channelled towards attitudes within Scotland's indigenous Pakistani community.
Mr Yousaf said: "The Anti-Homosexuality Bill in Uganda is a huge step back for equality and I have written to the UK Government asking it to make the strongest possible representations to the Government of Uganda.
"I have also urged the UK Foreign Secretary to offer asylum to any Ugandans who suffer threat or persecution as a result of the legislation.
"Ugandan legislation flies in the face of Scotland's values as a welcoming, open and tolerant society and we will continue to monitor the situation closely."
The Kaleidoscope Trust, set up in 2011 to pressure Britain's politicians on LGBT rights in the Commonwealth, welcomed the move, adding: "We have always felt the Games had an important part to play in tackling the scandal of LGBT abuses in the Commonwealth and welcome the Scottish Government taking the bull by the horns."
The Foreign Office had not yet received Mr Yousaf's correspondence but in a previous statement Mr Hague said: "We ask the government of Uganda to protect all its citizens and encourage tolerance, equality and respect. We will continue to press the government of Uganda to defend human rights for all, without discrimination on any grounds."