The Met Office said it could have widespread impacts on people and infrastructure on Monday and Tuesday.
The latest forecast is for temperatures to reach about 29C (84F) in parts of Dumfries and Galloway.
A red warning has been issued for the first time for parts of England, meaning a risk to life is likely as temperatures could hit 40C (104F).
The Scottish government said it had held a resilience meeting to prepare for the potential impacts of extreme heat in Scotland.
Severe high temperatures mean the risk of illness is not limited to vulnerable people.
The Met Office warned that people are likely to experience "some adverse effects" including sunburn or heat exhaustion and other heat-related illnesses.
There is an increased chance of heat-sensitive systems and equipment failing and there could be travel issues.
The highest temperature recorded in Scotland was 32.9C (91.2F) in the Borders in August 2003.
But BBC Scotland weather presenter Judith Ralston warned it could get even hotter next week.
She said: "Heat will build during the weekend peaking at 26C or 27C across mainland Scotland on Monday.
"But it's Tuesday when we're expecting even higher values, peaking at around 31C, for the Borders and Dumfriesshire.
"We may break the record summer temperatures recorded in Greycrook in the Scottish Borders."
Judith said the heat would be less extreme than south of the border, where temperatures in the high 30s are predicted for many areas.
She added: "This is a glancing blow compared to what will be affecting England and Wales with our weather turning fresher and more unsettled on Wednesday."
The UK Health Security Agency (UKHSA) has increased its heat health warning from level three to level four in affected areas - denoting a "national emergency".
The Met Office said the hot weather was caused by high pressure over the UK and hot air flowing from southern Europe.
People have being urged to stay hydrated, look out for vulnerable people, keep curtains closed and stay out of the sun in the middle of the day.
The heat is expected to increase pressure on the NHS, with the UK government's Cobra emergency committee holding a meeting on Thursday about how to prepare for it.
Justice Secretary Keith Brown, lead minister for resilience, said: "We are aware of the weather warnings currently in place and are receiving regular updates from partners including the Met Office and emergency services.
"Our resilience arrangements have been activated and stand ready at all times to coordinate a response to severe weather issues where required. We will continue to closely monitor developments."
He advised people to monitor forecasts and follow public health advice, including staying hydrated and avoiding excess alcohol.
Mr Brown also urged everyone to look out for vulnerable family, friends and neighbours, as older people, those with underlying conditions and those living alone may struggle to keep cool and hydrated.
He added: "Water safety incidents and drownings increase in hot weather and people should be aware of the dangers and use supervised beaches and pools when possible - follow the Water Safety Code and in an emergency call 999."
ScotRail has also warned that train services could be affected.
It said in a statement: "Rails can be up to 20C higher than the air temperature in hot weather, meaning they can expand or even buckle.
"For safety, we may need to run some trains at reduced speeds on these days."
Scottish Water has urged people to help maintain normal water supplies by being as efficient as possible.
It advised to use watering cans rather than hoses in gardens and urged the public not to fill up paddling pools and take shorter showers.
The Scottish Environment Protection Agency has increased its water scarcity risk rating for 11 more parts of the country. It said the situation was deteriorating in the east and south west.
WATCH: Chris Fawkes with the UK's weather forecast