We consider in this paper subdiffusion in a system with a thin membrane. The subdiffusion parameters are the same in both parts of the system separated by the membrane. Using the random walk model with discrete time and space variables the probabilities (Green's functions) P (x, t) describing a particle's random walk are found. The membrane, which can be asymmetrical, is characterized by the two probabilities of stopping a random walker by the membrane when it tries to pass through the membrane in both opposite directions. Green's functions are transformed to the system in which the variables are continuous, and then the membrane permeability coefficients are given by special formulae which involve the probabilities mentioned above. From the obtained Green's functions, we derive boundary conditions at the membrane. One of the conditions demands the continuity of a flux at the membrane but the other one is rather unexpected and contains the Riemann-Liouville fractional time derivative, where λ1, λ2 depending on membrane permeability coefficients (λ1 = 1 for a symmetrical membrane), α is a subdiffusion parameter and xN is the position of the membrane. This boundary condition shows that the additional 'memory effect', represented by the fractional derivative, is created by the membrane. This effect is also created by the membrane for a normal diffusion case in which α = 1.