Can I run a 2.5" tyre on a 40mm rim? I am currently running 2.8" 650b bontrager tyres on my MTB, I am finding that my current tyres do not have enough grip. I cannot find an aggressive enough tyre in 2.8", but I wondered about using a 2.5" tyre.

In short, I would like to know if I can use a 40mm rim with 2.5" tyres, will this have any problems or drawbacks?

Thanks in advance.
A slightly narrower tire should be fine in terms of fit on the rim. Check the manufacturer's specifications for compatible rim sizes to be sure.

You will lose some volume and impact absorption of course. A narrower tire will have a narrower contact patch so you many find that this decreases grip.