He will go through immigration in Heathrow anyway.
Nobody will stop him from going through customs without his checked baggage.
After coffee, he'll have to go through security to get to the gate, using his boarding pass, and will go through customs again, but not immigration, on arrival in Scotland.
I've done this many times, both as the traveler and as the coffee companion.
travel.stackexchange.com/users/19400/phoog
Yes, he should simply follow the "Arrivals and baggage claim" sign and not the "Flight connections sign".
No one at the airport will know that he is a connecting passenger as he leaves the airport.
There is no way for anyone to realise that.
His bags will still be transferred.
Even if they do know, it is totally allowed (although someone might think he is lost).
After dinner with you he can go over to Terminal 5, go up to the top floor, go to a check in desk to get his next boarding pass (if he doesn't have it), or if he does have it he can go airside.
He needs to go airside at least 35 minutes before departure and this is strictly enforced.
By the way, when I connect from international to domestic at Heathrow, I always go this way instead of following the normal Flight Connections route.
This is a lot faster, that's why.
travel.stackexchange.com/users/29377/Calchas
Of course he can.
A citizen can come and go as he pleases (at least, in the UK, he can).
He will, as others have pointed out, have to go through immigration, but no one will prevent him from leaving the airport.
But if you meet him in the airport, he is less likely to miss his connecting flight.
Two and a half hours minus security on return, passport control twice, and travel to & from your meeting place won't leave him much time.
In fact, to make it achievable, it seems like you live nearby.
So why not save him the stress and go to the airport to meet him?
That way, you will both have more time together.
travel.stackexchange.com/users/3390/Mawg says reinstate Monica
Here is an alternative: Buy yourself a full fare refundable ticket and go through security.
Have coffee with him behind security.
"Miss" your flight and get the refund.
You will spend more time with him as you can be with him right up until the time he has to board.
If his plane is delayed, you can spend even more time with him.
travel.stackexchange.com/users/30122/if NewQuestion voteCLOSE
I've done this twice, both time in countries that I am not a citizen of
(I'm Irish).
Once in Bogota, during a five-hour layover.
We left the airport as normal, through immigration (without our checked bags), took a taxi downtown, and enjoyed an nice afternoon strolling the old town.
On returning back to the airport, we just bypassed checkin (we already had boarding cards) and straight to security.
No problems.
The next time was in Washington DC.
We left the airport during a six-hour layover to visit some friends.
But this time we missed our flight as there was a problem with our child's boarding card which took forever to fix and then the security in Dulles is so slooooow!
We had to find a hotel and fly the next morning.
travel.stackexchange.com/users/1521/Ken
My brother is British, who is traveling to Scotland coming from Qatar on Qatar Airways. He'll have to spend two hours and a half in Heathrow as his ticket is a connecting flight and he has to change planes.  Can he leave the airport and have a coffee with me? His luggage will be transferred from one plane to another as usual and he does not have to pick them up for a coffee break.
Can I leave the airport during a connecting flight if I am a citizen of the country where I have to change planes?
travel.stackexchange.com
<air-travel><uk><transit><airports>
travel.stackexchange.com/questions/59657
travel.stackexchange.com/users/19359/Ulkoma
He will have to go through immigration following the "Arrivals and baggage claim" sign and  not  the "Flight connections sign", but nobody will stop him from going through customs without his checked baggage.   It is quite possible to leave the airport during a stopover and then return for the connecting flight if you are a citizen of the country. Nobody will stop you.
Nobody will stop a person leaving the airport as long as they are allowed to enter the country. A citizen can exit the airport and return for a connecting flight with no problems.