Peonies can survive near rosemary, but they rarely thrive together in the same bed because the two plants want opposite soil and water conditions: peonies need evenly moist, fertile, near-neutral soil and resent root disturbance, while rosemary demands sharp drainage, leans alkaline, and rots in wet ground. The pairing can work as a landscape composition—rosemary at the dry, sunny edge of a border and peonies a few feet away in better soil—but not as interplanted companions sharing one root zone. The rest of this answer explains why, where the pairing fails, and how gardeners reconcile the two.
The Core Conflict Is Water and Drainage, Not "Bad Chemistry"
Garden folklore sometimes frames plant compatibility as a matter of "companion planting" or allelopathy—one plant chemically suppressing another. For peonies and rosemary, there is no well-established evidence of chemical antagonism. The problem is straightforward and physical: their water and drainage requirements diverge.
Herbaceous peonies (Paeonia lactiflora and hybrids) grow from fleshy tuberous roots and perform best in deep, humus-rich, well-drained but moisture-retentive soil with a pH around 6.5 to 7.0. They tolerate some dryness once established but flower best with consistent moisture through spring and early summer. Crucially, they dislike being moved and are sensitive to root disturbance and to wet, poorly drained ground in winter, which encourages crown rot.
Rosemary (Salvia rosmarinus, formerly Rosmarinus officinalis) is a Mediterranean shrub. It wants full sun, coarse or sandy soil with excellent drainage, and a pH from roughly 6.5 up toward 7.5–8.0. It is drought-tolerant once established and is far more likely to be killed by overwinter wetness and poor drainage than by cold alone in many climates.
Put those side by side and the conflict is clear. If you water enough to keep peonies happy, you push rosemary toward root rot. If you keep the soil lean and dry enough for rosemary, peonies sulk, produce fewer blooms, and may struggle to establish. A single shared bed cannot easily satisfy both.
Why "Near" Matters More Than "With"
The word near in the question is doing real work. There is a meaningful difference between:
Interplanting—rosemary and peonies sharing the same soil volume and irrigation zone. Adjacency—rosemary at the front of a sunny border and peonies a short distance back, with the rosemary on slightly higher, sandier ground or a separate irrigation regime.
The first is likely to disappoint. The second can be genuinely attractive. Rosemary's fine, needle-like evergreen foliage and blue flowers contrast well with peony's bold leaves and large blooms, and both enjoy full sun. The trick is to treat them as neighbors with different needs, not as bedmates. A raised mound or a gravel-mulched strip for the rosemary, set apart from the peony's richer soil, lets each plant get what it wants.
Climate and Region Change the Answer
The pairing's viability depends heavily on where you garden, because rosemary's hardiness and peonies' heat tolerance vary.
In mild-winter, Mediterranean-type climates (parts of California, the Pacific Northwest, coastal zones), rosemary is nearly evergreen and robust, and the main risk is overwatering the rosemary to satisfy peonies. Here, keeping them separate and irrigating the peony zone more generously while letting the rosemary's zone dry out is the practical path.
In cold-winter climates (USDA zones roughly 5–7, using the current USDA plant hardiness map), rosemary is often only marginally hardy or grown as a container plant, while herbaceous peonies are reliable and even benefit from winter chill. In these regions rosemary may die back or die outright in a bad winter regardless of the peony, so the question of compatibility is secondary to whether rosemary survives at all.
In hot-summer climates, both plants can struggle for different reasons: peonies may need afternoon shade and consistent moisture, while rosemary tolerates heat and drought. That again pushes them toward separate micro-sites.
Because hardiness-zone designations and cultivar tolerances shift with edition and region, treat specific zone numbers as a starting point to verify locally, not a guarantee.
The pH Question
Peonies are often described as preferring near-neutral soil (about 6.5–7.0), and rosemary as tolerating or preferring somewhat alkaline soil. In practice, both are reasonably adaptable across a fairly wide band, and soil pH is rarely the deciding factor in whether they can grow near each other. Drainage and moisture are the binding constraints. A gardener with slightly acidic loam can often grow both; a gardener with heavy, waterlogged clay will struggle with rosemary no matter the pH.
This is worth stating plainly because pH is sometimes overemphasized in compatibility discussions. Correcting pH is possible but slow, and it will not fix a drainage mismatch. If your soil holds water, amend for drainage or plant rosemary in a raised bed or container before worrying about pH.
Root Disturbance and Spacing
Peonies resent root disturbance, which has a practical consequence for layout. If you plant rosemary close to a peony and later need to dig up or move the rosemary—likely in a cold climate where it may not survive—you risk damaging the peony's fleshy roots. Peonies also spread and enlarge over years, and their crowns should sit shallowly, with the "eyes" (buds) just an inch or two below the soil surface; deep planting is a common reason peonies fail to bloom. Digging around them to accommodate a shrub is a real hazard.
Give peonies room. A mature herbaceous peony can occupy a couple of feet across, and tree peonies (Paeonia suffruticosa groups) become woody shrubs needing more space and, in many climates, some protection. Rosemary itself can range from a low mound to a substantial shrub depending on cultivar and climate. Plan spacing so you are not excavating near peony crowns.
Practical Ways to Grow Both
If you want both plants in the same garden area, these approaches reconcile their needs:
Separate irrigation zones. Drip irrigation with distinct emitters or valves lets you water the peonies more and the rosemary less—or not at all once the rosemary is established. Elevate the rosemary. A raised mound, berm, or gravel-topped bed improves drainage exactly where rosemary sits while leaving the peony's soil richer and more moisture-retentive. Use containers for rosemary where winters are cold or soil is heavy. A pot with gritty, fast-draining mix lets rosemary thrive and lets you move it, without disturbing peonies. Mulch differently. Keep mulch away from rosemary's crown to avoid trapping moisture; peonies benefit from a light mulch but also should not be buried too deeply. Site by microclimate. Full sun suits both, but peonies appreciate some afternoon shade in hot regions, while rosemary wants maximum sun. A border where the rosemary occupies the hottest, driest, most exposed spot and peonies sit slightly back can work.
Where the Pairing Genuinely Fails
Be honest about the failure modes. Interplanting rosemary directly among peonies in heavy clay that stays wet will usually end with a rotting rosemary and unhappy peonies. Overwatering to please the peonies is the most common way rosemary dies in mixed beds. Conversely, in very dry, lean, sandy soil kept dry for rosemary, newly planted peonies may establish slowly and bloom sparsely. And in cold climates, no amount of clever siting will reliably keep a tender rosemary alive through a severe winter outdoors, so the "compatibility" question becomes moot.
Also note the ambiguity in the question itself: "thrive near" could mean physically adjacent in one bed, or simply in the same garden. The answer differs sharply between those readings, which is why the distinction between interplanting and adjacency matters so much here.
Bottom Line
Peonies and rosemary can share a garden and even a border, but they should not share the same root zone and watering regime. Give the rosemary the driest, sharpest-drained, sunniest spot and the peonies richer, more evenly moist soil a short distance away, and irrigate them separately. Attempting to interplant them in one bed usually trades one plant's health for the other's. In cold-winter regions, first confirm that rosemary will survive where you garden at all; if it won't, grow it in a container and keep the peony bed to itself.