“Modern Marvels,” is moving over for some sex, drugs and rock ’n’ roll, courtesy of Vice Media.

A&E Television Networks is turning over one of its channels to edgy millennial-focused content producer Vice Media, The Post has learned.

Vice, run by Canadian-born envelope-pusher Shane Smith, will launch by early 2016, according to ad agencies, which have heard the pitch. While news content will be headed to HBO as part of a separate deal, more lifestyle programming will fill the new channel.

A&E boss Nancy Dubuc will turn over H2, which airs shows such as “Modern Marvels,” to Vice content that spans music to cooking, sports, technology and hard-hitting documentaries. The channel currently has a story on its Web site about a clothing store in Kosovo inspired by Hillary Clinton’s style. There are other stories about pot and sports.

The move isn’t entirely a surprise, given A&E — a joint venture owned by Disney and Hearst — cut a deal to spend $250 million for a 10 percent stake in Vice.

Further negotiations also landed A&E the right to launch a Vice channel.

Vice is keeping editorial control, sources say.

Dubuc has been looking to diversify the company which owns A&E, History and Lifetime, by drawing more young viewers.

Control was one reason earlier talks between Vice and Turner Broadcasting failed. Turner had been in talks to turn over CNN’s HLN to Vice, but they broke down over editorial control and valuation.

H2 currently receives seven cents per month per subscriber, according to SNL Kagan, and has been negotiating the switch with distribution partners, sources say. It is unclear what price distributors will pay for the new channel.

Vice is hosting advertisers for its upfront presentation on Friday. Vice’s deal to produce regular news shows for Time Warner’s HBO remains in place.