EBay.com Inc. on Wednesday filed a lawsuit against Amazon.com Inc. accusing the company of illegally poaching sellers on its marketplace via eBay’s internal messaging system.

The lawsuit, filed in Santa Clara County in California, accuses Amazon of having “perpetrated a scheme to infiltrate and exploit eBay’s internal member email system” over the past few years. The alleged scheme was used by dozens of Amazon sales representatives in the U.S. and abroad to recruit high-value eBay sellers to Amazon, the lawsuit said.

The...