From Proto-Indo-European *prokʷe, from *pro- + *-kʷe (equivalent to Latin pro + -que). The expected form would accordingly be *proque. The second -p- is probably due to assimilation. Compare the reverse development in quinque, coquo, which was hindered here by the initial cluster pr-. A less likely explanation is borrowing from Oscan, where -𐌐𐌄 (-pe) is the regular reflex.
The change from locative/ablative to accusative is caused by the adverbial suffix.