Authorities said Xavier Parnell, 24, and Matthew Davis, 22, answered a Craigslist ad for a laptop computer for sale.
During the transaction, Parnell allegedly pulled out a handgun on a Huntington Beach man, demanded the laptop and fled in a car driven by Davis.
Both men were arrested in Dana Point on Tuesday evening after detectives spotted the suspects.
A black replica handgun was found in their vehicle. Both men are being held in the Orange County Jail.