A novel and computationally efficient method for d-q control of solar photovoltaic (SPV) integrated UPQC (PV-UPQC) is presented in this paper. A digital filter is used to extract fundamental positive sequence (FPS) component of distorted grid voltage which is used to generate the sine and cosine values necessary in d-q based control. The shunt compensator of PV-UPQC compensates for the load side power quality issues along with injecting active power from SPV array. The SPV array is integrated to the DC-bus of the PV-UPQC through a step up DC-DC converter. The step up converter is controlled by maximum power point tracking (MPPT) algorithm which extracts peak power available from the PV array. The control of series compensator of PV-UPQC which compensates for grid side power quality issues is such that the voltage is injected in-phase with grid voltage. The algorithm is implemented in a three-phase four-wire UPQC consisting of three leg series compensator and four leg shunt compensator. The system is simulated in Matlab-Simulink environment using a combination of nonlinear current fed load and a single phase linear load. The dynamic performance of the system is analyzed under conditions of grid voltage sag/swell, irradiation variation and load disturbances.