Although chronic treatment with morphine is known to alter the function and morphology of excitatory synapses, the effects of other opioids on these synapses are not clear. Here we report distinct effects of several opioids (morphine, [D-ala2,me-phe4,gly5-ol]enkephalin (DAMGO), and etorphine) on miniature excitatory postsynaptic currents (mEPSCs) in cultured hippocampal neurons: 1) chronic treatment with morphine for >3 days decreased the amplitude, frequency, rise time and decay time of mEPSCs. In contrast, "internalizing" opioids such as etorphine and DAMGO increased the frequency of mEPSCs and had no significant effect on the amplitude and kinetics of mEPSCs. These results demonstrate that different opioids can have distinct effects on the function of excitatory synapses. 2) mu opioid receptor fused with green fluorescence protein (MOR-GFP) is clustered in dendritic spines in most hippocampal neurons but is concentrated in axon-like processes in striatal and corticostriatal nonspiny neurons. It suggests that MORs might mediate pre- or postsynaptic effects depending on cell types. 3) Neurons were cultured from MOR knock-out mice and were exogenously transfected with MOR-GFP. Chronic treatment with morphine suppressed mEPSCs only in neurons that contained postsynaptic MOR-GFP, indicating that opioids can modulate excitatory synaptic transmission postsynaptically. 4) Morphine acutely decreased mEPSC amplitude in neurons expressing exogenous MOR-GFP but had no effect on neurons expressing GFP. It indicates that the low level of endogenous MORs could only allow slow opioid-induced plasticity of excitatory synapses under normal conditions. 5) A theoretical model suggests that morphine might affect the function of spines by decreasing the electrotonic distance from synaptic inputs to the soma.