All the goals came in an action-packed first 36 minutes but it was the visitors who took a shock lead with just five minutes gone.
Brentford’s defence stood still after a blatant push but the referee waved play on and Stuart Drummond volleyed home from close range.
That setback sparked the Bees into life and Charlie MacDonald steered home Glenn Poole’s cross at the near post three minutes later.
MacDonald returned the compliment three minutes later, squaring the ball for Poole who took his time to coolly slot home from eight yards.
Poole forced Morecambe goalkeeper Barry Roche to tip onto the post from a 30-yard free-kick but it was only a temporary reprieve for the visitors. MacDonald sent in a pinpoint cross from the left to pick out Nathan Elder who powered a header home after 36 minutes.