The majority of Antarctic ice is discharged via long and narrow fast-flowing ice streams. At ice stream margins, the rapid transition from the vertical shearing flow in the ice ridges surrounding the stream to a rapidly sliding plug flow in the stream itself leads to high stress concentrations and a velocity field whose form is non-trivial to determine. In this paper, we develop a boundary layer theory for this narrow region separating a lubrication-type ice ridge flow and a membrane-type ice stream flow. This allows us to derive jump conditions for the outer models describing ridge and stream self-consistently. Much of our focus is, however, on determining the velocity and shear heating fields in the margin itself. Ice stream margins have been observed to change position over time, with potentially significant implications for ice stream discharge. Our boundary layer model allows us to extend previous work that has determined rates of margin migration from a balance between shear heating in the margin and the cooling effect of margin migration into the colder ice of the surrounding ice ridge. Solving for the transverse velocity field in the margin allows us to include the effect of advection due to lateral inflow of ice from the ridge on margin migration, and we demonstrate that this reduces the rate of margin migration, as previously speculated.