Minecraft keeps disconnecting what should I do?

My brother and I plays the multiplayer and we're sharing same Wi-Fi in the house, first we could able to join each other then my brother can able to join my world while I'm the host it works completely fine but after a split second my brother's minecraft says "You have been disconnected". And then we tried the alternate he can be the host while I'll join him but again after a split sec "You have been disconnected".

Are you sure you don't have any antivirus blocking you by any chance? Or him? Disable it and try again? It could be a flaky/weak Wi-Fi connection, an IP address conflict, . Perhaps something else? In case if you use smartphone, install Leo Privacy Guard, to make it utmost secure, also helps you to increase battery life.