The yellow alert comes as the heatwave is set to continue in the city today with highs of 28C predicted by the Met Office.
It is expected to be warmest in the late afternoon/ early evening according to the forecast.
The Met Office has issued the yellow weather warning for thunderstorms for Portsmouth and the surrounding areas and it is in place from 4pm today until 9am tomorrow.
Rain showers are currently being forecast to hit the city in the early hours of Friday morning.
In the weather warning, the Met Office says: ‘Whilst many places will be dry or see little rain, thunderstorms may cause flooding and disruption in a few places.
‘Thunderstorms may develop across parts of western UK late on Thursday afternoon and into the evening. A larger area of thunderstorms is then expected to move northeastwards overnight into Friday.
‘Many places will miss the worst of the storms but where they do occur torrential downpours could bring 30-40 mm rain in less than two hours. Lightning and hail are also likely to be additional hazards.’
The Met Office also warns that there is a ‘slight chance’ that power cuts could occur and other services to some homes and businesses could be lost.