Gate valve is mainly used to turn on or turn off the pipeline in pneumatic conveying. When the gate valve is fully open, the particles are easy to collide with the cavity rear wall and enter into the cavity, resulting in particles’ accumulation in the cavity. The particles in cavity will accumulate between the cavity bottom and the flashboard bottom wall and prevent the gate from turning off normally. Meanwhile, the particles’ collision with cavity rear wall will cause serious erosion. Both the particles’ accumulation and erosion will cause the poor sealing of the gate valve, further resulting in the leakage of the pipeline system. To reduce the particles’ accumulation in cavity and erosion on cavity when the gate valve is fully open, we simplify the gate valve into a cavity structure and study it. We find that adding a slope upstream the cavity can effectively reduce the particles’ accumulation in the cavity and the erosion on the cavity rear wall. In this work, Eulerian–Lagrangian method in commercial code (FLUENT) was used to study the gas–solid two-phase flow and erosion characteristics of a cavity with a slope. The particle distribution shows that the particles with Stokes number St = 1.3 and St = 13 cannot enter the cavity due to the slope, but the particles with St = 0.13 enter the cavity following the gas. For St = 13, the particles collide with the wall many times in the ideal cavity. Erosion results show that the slope can transfer the erosion on cavity rear wall to the slope and reduce the maximum erosion rate of the wall near the cavity to some degrees.