All lines in the Portsmouth area, along with those between Surbiton and Effingham Junction, will be shut on Saturday and Sunday.
It means no trains will stop at Cosham Station, close to Portsmouth's Mutiny Festival venue.
Organisers warned only a "limited bus replacement" service will be operating.
More on this and other stories from across the South of England
Network Rail and South West Trains urged passengers to check their journeys in advance, because of the "essential" track renewal work at Portcreek Viaduct and maintenance work between Surbiton and Effingham Junction.
Headline acts at Mutiny Festival, which will be held on Saturday and Sunday and is expected to attract 30,000 people, include 50 Cent and Chase and Status.
Festival-goers face travel disruption over the Bank Holiday weekend as rail engineering works hit Hampshire and Surrey.