So I did some calculations on Showdown.
Even if your Xerneas has 252 EVs in speed, but 0 speed IV and a negative nature for speed, its speed will be 239. If your brother's Xerneas has 16 or higher IV in speed with a positive nature, it will have a minimum 240 speed and outspeed yours.
Basically, your Xerneas has a really bad speed IV and your brother's has a really good one.
And idk about how much you know about how your brother plays Pokemon, but it's possible that he could've EV trained and you just didn't notice?