Levitation lifts you into the air against your will, and when it wears off, gravity collects the debt with fall damage.
How to Get Levitation in Survival
Shulker projectiles in End cities apply Levitation for about ten seconds. There is no potion and no way to inflict it on yourself in survival; it is purely a shulker hazard.
Using Levitation Well
Being levitated high over the End city walkways is lethal on landing, so carry slow falling, ender pearls, or a water bucket to cancel the drop. Blocking shulker bullets with a shield prevents the effect entirely.
Levitation Effect FAQ
What is the effect ID for Levitation?
The effect ID for Levitation is minecraft:levitation. Java Edition 1.13+ /effect commands use this namespaced form. On Java 1.12.2 and earlier the numerical ID was 25.
How do I give myself the Levitation effect?
Run /effect give @p minecraft:levitation 60 1 to get Levitation II for 60 seconds. The first number is the duration in seconds; the second is the amplifier (0 = level I, 1 = level II). Remove it with /effect clear @p minecraft:levitation.
Is Levitation a positive or negative effect?
Levitation is a harmful (negative) status effect in Minecraft Java Edition, based on its registry category (harmful).
How do you stop Levitation in Minecraft?
Drink milk to clear it, or negate the fall with Slow Falling, an ender pearl thrown at a wall, or a water bucket placed before landing. Blocking the shulker projectile with a shield avoids the effect altogether.
What gives you the Levitation effect?
Shulker bullets, fired by shulkers in End cities. The homing projectiles apply Levitation on hit unless blocked with a shield or dodged.