Sound like possibly the level gap between your starting pokemon and the legendary is too high. Like, The legendary's first move is flee. So if it's a higher level, and has a higher speed than your pokemon, it'll make it's move first and book it before you even have a chance.
Do some research, grab a fast pokemon, give it some boosters if you like, level it up close to the legendarily, then have at it again and see if you have different results.