If you want to keep a barren environment next to a lush environment find a way to separate their water cycle. Why? Because the primary difference between a lush and verdant environment, and a dry and desolate environment, has very little to do with the amount of water the place initially attracts. The important feature is how long that environment manages to keep the water around.
As has been pointed out Mountain ranges are naturally very good at keeping the water cycles of two areas separate. They also can help attract water by causing a monsoon.
A good example of this is India.
India has a powerful monsoon. The landmass is roughly shaped like a dagger, or a sharks tooth, with high mountains along the hilt/base running down the middle toward the tip. Both sides are surrounded by warm tropical oceans. As the summer progresses the oceans heat creating moisture rich air, but the mountains warm quicker creating a strong temperature gradient, sucking the rain inland toward the mountains where it is forced up and every last drop of moisture is squeezed from it, creating heavy torrential rain. The landscape is such that it takes the better part of a year for most of this water to find its way back to the coast, in time for the next monsoon. However if you look north past the mountains you'll find a very large desert.
Alternately, mountains can help trap water. Think the Amazon rain basin, over 80% of the rain that falls there is water that never left. The trees push so much moisture up into the air, it either falls immediately or is swept back up the mountains were it falls again. If you were to cut down every tree, most of the water would just disappear, as it would just drain out into the ocean. In this case the mountains help with the water cycle but its the trees doing all the heavy lifting. You'll find most rain forests near mountains.
Another method is buffering the water. Think of the great lakes in the middle of Africa. Here there is a lot of water, most of it fell during large wet seasons over many years. Some years the rains are not so good and these lakes start to shrink, but still manage to support large thriving ecosystems around them. In good years they fill right back up again. If the rains started to come too infrequently the lakes would slowly dry out, and the communities around the smaller ones would be the first to go. But if you look around much of the environment further away from these lakes is very dry and seasonal.
Lets look at a desert, i will pick the Sahara desert.
- It has mountains.
- It is surrounded by tropical ocean.
- It has aquifers.
- It actually receives rain.
Why isn't it a verdant and lush region?
- Ironically the desert isn't hot enough to sustain a regular and consistent monsoon.
- The ground is mostly sandy or bare rock. Neither surfaces tend to slow water, or keep it around very long.
- Their isn't a lot of vegetation that slows rain run off and evaporates it.
- The aquifers are empty, and the rain is so spaced out that they dry up before the next rain.
To terraform this desert would not require much water, it would require addressing all the ways in which water escapes the environment, and reducing it to the point were the amount leaving the ecosystem is roughly the amount the ecosystem receives, with maybe a few buffers for the bad years.
But if you look around this desert, you'll see to the north Europe which is arguably quite green. To the East you'll see India, To the south is a seasonal grassland with a number of lake systems.